void initSearchHex(byte[] sequence)
    {
        byteFindSequence = sequence;

        if (sequence.length > MAX_SEQUENCE_SIZE) {
            byteFindSequence = new byte[MAX_SEQUENCE_SIZE];
            System.arraycopy(sequence, 0, byteFindSequence, 0, MAX_SEQUENCE_SIZE);
        }

        literalByteLength = byteFindSequence.length;
    }
Get the next position and length of a matching literal

@return an array with 2 elements, the first one a Long (position in the file),
        and the second one an Integer (byte length of the matching literal),
        or null if there are no matches
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/BinaryTextFinder.java