Created
August 20, 2015 00:03
-
-
Save caot/25be8394fdebadfc14a8 to your computer and use it in GitHub Desktop.
java byte[] to String
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.xml.bind.DatatypeConverter; | |
| public static String base64EncodedString(byte[] bytes) { | |
| return DatatypeConverter.printBase64Binary(bytes); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment