text: public override ByteBuffer Read(int length, long position){if (position >= size){throw new IndexOutOfRangeException("Unable to read " + length + " bytes from " +position + " in stream of length " + size);}int toRead = (int)Math.Min(length, size - position);return ByteBuffer.CreateBuffer(buffer, (int)position, toRead);}