public int replaceAll(String findString, boolean isFindHexString, boolean searchForward,
                          boolean ignoreCase, String replaceString, boolean isReplaceHexString)
        throws IOException
    {
        int result = 0;
        stopSearching = false;
        while (!stopSearching &&
            findAndSelectInternal(findString, isFindHexString, searchForward, ignoreCase, false)) {
            ++result;
            replace(replaceString, isReplaceHexString);
        }
        if (result > 0) {
            setSelection(getSelection()[0], getSelection()[1]);
        }

        return result;
    }
Replaces all occurrences of findString with replaceString.
The find starts at the current caret position.

@param findString         the literal to find
@param isFindHexString    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
@param replaceString      the new string
@param isReplaceHexString consider the literal as an hex string (ie. "0fdA1"). Used for binary
                          finds. Will replace full bytes only, odd number of hex characters will have a leading '0' added.
@return number of replacements
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexEditControl.java