Guest User

Untitled

a guest
Apr 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. String image = obj.getString("data");
  2.  
  3. byte[] bytes = image.getBytes();
  4.  
  5. File file = new File(Environment.getExternalStorageDirectory(), "DirImage/test.jpg");
  6. FileOutputStream fos = new FileOutputStream(file);
  7. fos.write(bytes);
  8. fos.flush();
  9. fos.close();
Add Comment
Please, Sign In to add comment