Encode/Decode Base64 to byte[]
public static byte[] encode(byte[] b) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); OutputStream b64os = MimeUtility.encode(baos, “base64”); b64os.write(b); b64os.close(); return baos.toByteArray(); } public static byte[] decode(byte[] b) throws Exception { ByteArrayInputStream bais = […]