code: public ByteBuffer wrap(int offset, int length) {
  		if (offset > this.memory.length || offset > this.memory.length - length) {
  			throw new IndexOutOfBoundsException();
  		}
  		
  		if (this.wrapper == null) {
  			this.wrapper = ByteBuffer.wrap(this.memory, offset, length);
  		}
  		else {
  			this.wrapper.position(offset);
  			this.wrapper.limit(offset + length);
  		}
  		
  		return this.wrapper;
  	}
docs: Wraps the chunk of the underlying memory located between <tt>offset<tt> and
  <tt>length</tt> in a NIO ByteBuffer.
  
  @param offset The offset in the memory segment.
  @param length The number of bytes to be wrapped as a buffer.
  @return A <tt>ByteBuffer</tt> backed by the specified portion of the memory segment.
  @throws IndexOutOfBoundsException Thrown, if offset is negative or larger than the memory segment size,
  or if the offset plus the length is larger than the segment size.