code: protected ByteBuffer onRead(byte[] buffer, int offset, int length) {
          if (length <= 0)
              return BufferUtils.EMPTY_BUFFER;
          return ByteBuffer.wrap(buffer, offset, length);
      }
docs: Callback method invoked just after having read from the stream,
  but before returning the iteration element (a {@link ByteBuffer}
  to the caller.
  <p>
  Subclasses may override this method to copy the content read from
  the stream to another location (a file, or in memory if the content
  is known to fit).
  
  @param buffer the byte array containing the bytes read
  @param offset the offset from where bytes should be read
  @param length the length of the bytes read
  @return a {@link ByteBuffer} wrapping the byte array