List of utility methods to do XML Base64 Encode Decode
String | toB64(byte[] bytes) to B return javax.xml.bind.DatatypeConverter.printBase64Binary(bytes);
|
String | toBase10(String base64) to Base return new String(DatatypeConverter.parseBase64Binary(base64.trim().substring("Basic ".length()).trim())); |
String | toBase64(byte[] array) Converts a byte array into a hexadecimal string. return DatatypeConverter.printBase64Binary(array);
|
String | toBase64Encoded(String unencoded) to Base Encoded if (unencoded == null) { return null; } else if (unencoded.getBytes().length == 0) { return new String(); return DatatypeConverter.printBase64Binary(unencoded.getBytes()); |
String | toBase64String(final byte[] data) Converts the specified data to base64 encoded string. return javax.xml.bind.DatatypeConverter.printBase64Binary(data);
|
String | toSafePathBase64(byte[] value) to Safe Path Base return toBase64(value).replace('/', '-'); |
byte[] | urlSafeBase64Decode(String in) url Safe Base Decode in = in.replace('-', '+'); in = in.replace('_', '/'); return DatatypeConverter.parseBase64Binary(in); |