docs: private int ensureBuffer(int offset, int length) throws IOException {
  		final int lastPos = offset + length - 1;
  		final int desiredSize = ((lastPos / BUFFER_SIZE) + 1) * BUFFER_SIZE;
  		final int currentSize = this.buffer.length;
  
  		if (desiredSize > currentSize) {
  			final byte[] readBuffer = new byte[desiredSize - currentSize];
  			final int count = this.in.read(readBuffer);
  
  			if (count > 0) {
  				final byte[] newBuffer = new byte[currentSize + count];
  				System.arraycopy(this.buffer, 0, newBuffer, 0, currentSize);
  				System.arraycopy(readBuffer, 0, newBuffer, currentSize, count);
  				this.buffer = newBuffer;
  			}
  			return (lastPos < this.buffer.length) ? length : length - (lastPos - this.buffer.length + 1);
  		}
  		return length;
  	}