code: public int fromInputStream(final InputStream in, final int iMaxSize) throws IOException {
  		final byte[] buffer = new byte[iMaxSize];
  		final int readBytesCount = in.read(buffer);
  		if (readBytesCount == -1) {
  			_source = EMPTY_SOURCE;
  			_size = 0;
  		} else if (readBytesCount == iMaxSize) {
  			_source = buffer;
  			_size = iMaxSize;
  		} else {
  			_source = Arrays.copyOf(buffer, readBytesCount);
  			_size = readBytesCount;
  		}
  		return _size;
  	}
docs: Reads the input stream in memory specifying the maximum bytes to read. This is more efficient than
  {@link #fromInputStream(InputStream)} because allocation is made only once.
  
  @param in
  Input Stream, use buffered input stream wrapper to speed up reading
  @param iMaxSize
  Maximum size to read
  @return Buffer count of bytes that are read from the stream. It's also the internal buffer size in bytes
  @throws IOException if an I/O error occurs.