Guest User

Untitled

a guest
Feb 13th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. ByteArrayOutputStream result = new ByteArrayOutputStream();
  2. byte[] buffer = new byte[1024];
  3. int length;
  4.  
  5. while ((length = inputStream.read(buffer)) != -1) {
  6. result.write(buffer, 0, length);
  7. }
  8.  
  9. return result.toString("UTF-8");
Add Comment
Please, Sign In to add comment