Package ca.uhn.hl7v2.model.primitive
Class FormattedTextEncoder
java.lang.Object
ca.uhn.hl7v2.model.primitive.FormattedTextEncoder
Provides methods to convert between HL7 Formatted Text encoding (See Chapter 2.7) and other encoding schemes.
For now, only HTML encoding is supported, but others may be added.
Note that this class is not threadsafe! Always use a new instance (from a factory method) for each invocation.
- Author:
- James Agnew
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionConvert the input string containing FT encoding strings (\.br\, \.sp XX\, etc.) into the appropriate output type for this encoder (currently HTML)static FormattedTextEncoderReturns a newly created instance which uses standard HTML encoding.
-
Method Details
-
encode
Convert the input string containing FT encoding strings (\.br\, \.sp XX\, etc.) into the appropriate output type for this encoder (currently HTML)- Parameters:
theInput- The input string- Returns:
- An encoded version of the input string
-
getInstanceHtml
Returns a newly created instance which uses standard HTML encoding. The returned instance is not threadsafe, so this method should be called to obtain a new instance in any thread that requires a FormattedTextEncoder.
-