code: public static String slurp(final InputStream is, final int bufferSize) {
  		final char[] buffer = new char[bufferSize];
  		final StringBuilder out = new StringBuilder();
  		try {
  			final Reader in = new InputStreamReader(is, "UTF-8");
  			try {
  				for (;;) {
  					int rsz = in.read(buffer, 0, buffer.length);
  					if (rsz < 0)
  						break;
  					out.append(buffer, 0, rsz);
  				}
  			} finally {
  				in.close();
  			}
  		} catch (UnsupportedEncodingException ex) {
  			/* ... */
  		} catch (IOException ex) {
  			/* ... */
  		}
  		return out.toString();
  	}
docs: copied from http://stackoverflow.com/questions/309424/read-convert-an-inputstream-to-a-string
  
  @param is file to be read
  @param bufferSize size of the buffer used to read the file
  @return file content as String