text: public void write(ByteBuffer src, long position) {long endPosition = position + src.capacity();if(endPosition > buffer.length) {extend(endPosition);}src.get(buffer, (int)position, src.capacity());if(endPosition > size) {size = endPosition;}}