void populatePart(int size)
        throws IOException
    {
        if (content == null) return;

        byteBuffer = null;  // multiple FileChannel.read(byteBuffer) leak memory, so don't reuse buffer
        byteBuffer = ByteBuffer.allocate(MAP_SIZE);
//	if (byteBuffer == null)
//		byteBuffer = ByteBuffer.allocate(MAP_SIZE);
        byteBuffer.limit(size);
        byteBuffer.position(0);
//	try {
        content.get(byteBuffer, bufferPosition);
//	} catch (OutOfMemoryError e) {
//		byteBuffer = null;
//		byteBuffer = ByteBuffer.allocate(MAP_SIZE);
        //	byteBuffer.limit(size);
        //byteBuffer.position(0);
        //content.get(byteBuffer, myCurrentPosition);
        //}
        byteBuffer.limit(byteBuffer.position());
        byteBuffer.position(0);
    }
Get the current location being searched in the content. Approximate value.

@return position in the content
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/BinaryTextFinder.java