(byte[] bytes)
| 66 | } |
| 67 | |
| 68 | public static String encodeBytes(byte[] bytes) throws UnsupportedEncodingException { |
| 69 | return bytes == null ? null : new String(Base64.encodeBase64(bytes), Charset.forName("UTF-8")); |
| 70 | } |
| 71 | |
| 72 | public static byte[] decodeBytes(String str) throws UnsupportedEncodingException { |
| 73 | return Base64.decodeBase64(str.getBytes(Charset.forName("UTF-8"))); |