private void saveOriginal(Object decodedMessage, Object originalMessage) {
        if (getConfig().getBoolean(Keys.DATABASE_SAVE_ORIGINAL) && decodedMessage instanceof Position position) {
            if (originalMessage instanceof ByteBuf buf) {
                position.set(Position.KEY_ORIGINAL, ByteBufUtil.hexDump(buf, 0, buf.writerIndex()));
            } else if (originalMessage instanceof String stringMessage) {
                position.set(Position.KEY_ORIGINAL, DataConverter.printHex(
                        stringMessage.getBytes(StandardCharsets.US_ASCII)));
            }
        }
    }
Method called when config is initialized.
src/main/java/org/traccar/ExtendedObjectDecoder.java