base 64 encode and decode in java
// encode base64 in java byte[] data = text.getBytes("UTF-8"); String base64 = Base64.encodeToString(data, Base64.DEFAULT); // decode base64 in java byte[] data = Base64.decode(base64, Base64.DEFAULT); String text = new String(data, "UTF-8");