public void setContent(@NotNull BinaryContent newContent, String charset) {
        if (content != null) {
            content.dispose();
        }
        content = newContent;
        hexEditControl.setCharset(charset);
        hexEditControl.setContentProvider(content, true);
    }
Sets new content for editing

@param newContent the content to be edited
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexManager.java