private boolean findAndSelectInternal(String findString, boolean isHexString, boolean searchForward,
                                          boolean ignoreCase, boolean updateGui)
        throws IOException
    {
        if (findString == null) return true;

        initFinder(findString, isHexString, searchForward, ignoreCase);
        final Object[] result = new Object[2];
        HexManager.blockUntilFinished(() -> {
            try {
                result[0] = finder.getNextMatch();
            } catch (IOException e) {
                result[1] = e;
            }
        });
        if (result[1] != null) {
            throw (IOException) result[1];
        }
        Object[] vector = (Object[]) result[0];
        if (vector != null && vector.length > 1 && vector[0] != null && vector[1] != null) {
            startPosition = (Long) vector[0];
            caretStickToStart = false;
            if (updateGui) {
                setSelection(startPosition, startPosition + (Integer) vector[1]);
            } else {
                select(startPosition, startPosition + (Integer) vector[1]);
            }
            previousFindEnd = getCaretPos();

            return true;
        }

        return false;
    }
Performs a find on the text and sets the selection accordingly.
The find starts at the current caret position.

@param findString    the literal to find
@param isHexString   consider the literal as an hex string (ie. "0fdA1"). Used for binary finds.
                     Will search full bytes only, odd number of hex characters will have a leading '0' added.
@param searchForward look for matches after current position
@param ignoreCase    match upper case with lower case characters
@return whether a match was found
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexEditControl.java