code: private byte[] read(InputStream in) throws IOException {
  		ByteArrayOutputStream out = new ByteArrayOutputStream(READ_FILE_BASE_SIZE);
  		byte[] buffer = new byte[READ_BUFFER_SIZE];
  		int count = in.read(buffer);
  		while (count != -1) {
  			if (count != 0) {
  				out.write(buffer, 0, count);
  			}
  			count = in.read(buffer);
  		}
  		in.close();
  		return out.toByteArray();
  	}
docs: Private methods: