Class HexSequenceConfiguredReplacementSource

  • All Implemented Interfaces:
    ReplacementSource

    public class HexSequenceConfiguredReplacementSource
    extends AbstractReplacementSource
    ReplacementSource implementation which assumes that the value is a byte sequence represented as a sequence of hexadecimal numbers (2 characters per byte).

    Used with FindAndReplaceService to replace text in the message; for instance if one of the values from FindAndReplaceService.getFindAndReplaceUnits() is 0d0a then this will generate an actual replacement value of carriage return linefeed.

    In most cases you will be using ConfiguredReplacementSource, however there may be times when the replacement value cannot be described as part of an XML configuration (for instance the 'vertical tab' character, 0x0B, is generally considered invalid depending on the version of the XML standard).

    In the adapter configuration file this class is aliased as hex-sequence-configured-replacement-source which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • HexSequenceConfiguredReplacementSource

        public HexSequenceConfiguredReplacementSource()
      • HexSequenceConfiguredReplacementSource

        public HexSequenceConfiguredReplacementSource​(java.lang.String charset)
      • HexSequenceConfiguredReplacementSource

        public HexSequenceConfiguredReplacementSource​(java.lang.String value,
                                                      java.lang.String charset)
    • Method Detail

      • getCharset

        public java.lang.String getCharset()
      • setCharset

        public void setCharset​(java.lang.String charset)
        Set the character set to be used when converting the hexadecimal byte sequence into a string.
        Parameters:
        charset - the character set, default is 'null' which uses the platform default.