Base64Utils { public String bitmapToBase64(Bitmap bitmap) { String base64; ByteArrayOutputStream bStream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, bStream); byte[] bytes = bStream.toByteArray(); base64 = Base64.encodeToString(bytes, Base64.DEFAULT); return base64; }  static String encode(byte[] data); static byte[] decode(String s); String bitmapToBase64(Bitmap bitmap); Bitmap base64ToBitmap(String base64);  }
@Test public void bitmapToBase64() throws Exception { }