@ComponentProfile(summary="Turn a hex encoded string into a java string using the specified character encoding", tag="service,metadata") public class HexToStringService extends ReformatMetadata
StringToHexService
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.
MetadataServiceImpl.LogWrapper
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
UTF_8 |
DEBUG, ERROR, INFO, TRACE, WARN
log
Constructor and Description |
---|
HexToStringService() |
HexToStringService(java.lang.String regex) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCharacterEncoding() |
java.lang.String |
getCharset() |
java.lang.String |
reformat(java.lang.String s,
java.lang.String msgCharset)
Reformat a metadata value
|
void |
setCharset(java.lang.String encoding)
The character encoding to be applied when decoding the hex string.
|
doService, getMetadataKeyRegexp, setMetadataKeyRegexp
closeService, getMetadataLogger, initService, logMetadata, logMetadata, logMetadata, logMetadata, prepare, setMetadataLogger, withMetadataLogger
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
reformat
protected static final java.lang.String UTF_8
public HexToStringService()
public HexToStringService(java.lang.String regex)
public java.lang.String getCharset()
public void setCharset(java.lang.String encoding)
encoding
- protected java.lang.String getCharacterEncoding()
public java.lang.String reformat(java.lang.String s, java.lang.String msgCharset) throws java.lang.Exception
MetadataReformatter
s
- the string to reformatmsgCharset
- the charset of the messagejava.lang.Exception