Class HexToStringService

All Implemented Interfaces:
AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, Service, MetadataReformatter, StateManagedComponent
Direct Known Subclasses:
StringToHexService

@ComponentProfile(summary="Turn a hex encoded string into a java string using the specified character encoding", tag="service,metadata") public class HexToStringService extends ReformatMetadata
This class will decode hex encoded metadata value(s) using the specified character encoding
See Also:

In the adapter configuration file this class is aliased as hex-to-string-metadata-service which is the preferred alternative to the fully qualified classname when building your configuration.

  • Field Details

  • Constructor Details

    • HexToStringService

      public HexToStringService()
    • HexToStringService

      public HexToStringService(String regex)
  • Method Details

    • getCharset

      public String getCharset()
    • setCharset

      public void setCharset(String encoding)
      The character encoding to be applied when decoding the hex string. If no encoding is specified, UTF8 will be used.
      Parameters:
      encoding -
    • getCharacterEncoding

      protected String getCharacterEncoding()
    • reformat

      public String reformat(String s, String msgCharset) throws Exception
      Description copied from interface: MetadataReformatter
      Reformat a metadata value
      Parameters:
      s - the string to reformat
      msgCharset - the charset of the message
      Returns:
      the replacment string.
      Throws:
      Exception