code: public ByteBuffer toByteBuffer(int index, int length)
      {
          checkPositionIndexes(index, index + length, this.length);
          index += offset;
          return ByteBuffer.wrap(data, index, length).order(LITTLE_ENDIAN);
      }
docs: Converts this buffer's sub-region into a NIO buffer.  The returned
  buffer shares the content with this buffer.