SHARE
TWEET

Untitled

a guest Mar 24th, 2012 28 Never
  1. final MAX_BUFFER_SIZE = 256;
  2.  
  3. StringBuilder result = new StringBuilder();
  4. char[] buffer = new char[MAX_BUFFER_SIZE];
  5. int readChars;
  6. while ((readChars = stream.read(buffer, 0, MAX_BUFFER_SIZE)) > 0) {
  7.     result.append(buffer, 0, readChars);
  8. }
RAW Paste Data
Top