Package com.aoindustries.util.i18n
Class MarkupCoercion
- java.lang.Object
-
- com.aoindustries.util.i18n.MarkupCoercion
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappend(Object value, MarkupType markupType, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Appendable out)Encodes an object's String representation with markup enabled using the provided encoder, supporting streaming for specialized types.static voidappend(Object value, MarkupType markupType, Appendable out)Appends an object's String representation with markup enabled, supporting streaming for specialized types.static voidwrite(Object value, MarkupType markupType, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Writer out)Encodes an object's String representation with markup enabled using the provided encoder, supporting streaming for specialized types.static voidwrite(Object value, MarkupType markupType, Writer out)Writes an object's String representation with markup enabled, supporting streaming for specialized types.
-
-
-
Method Detail
-
write
public static void write(Object value, MarkupType markupType, Writer out) throws IOException
Writes an object's String representation with markup enabled, supporting streaming for specialized types.- Throws:
IOException- See Also:
MarkupType
-
write
public static void write(Object value, MarkupType markupType, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Writer out) throws IOException
Encodes an object's String representation with markup enabled using the provided encoder, supporting streaming for specialized types.- Parameters:
encodeLookupMarkup-Does the lookup markup need to be encoded?
When
encodeLookupMarkup = true:- Write markup prefix without encoding
- Write any encoder prefix
- Write value with encoding
- Write any encoder suffix
- Write markup suffix without encoding
When
encodeLookupMarkup = false:- Write any encoder prefix
- Write markup prefix with encoding
- Write value with encoding
- Write markup suffix with encoding
- Write any encoder suffix
encoder- no encoding performed when nullencoderPrefixSuffix- This includes the encoder prefix and suffix.- Throws:
IOException- See Also:
MarkupType
-
append
public static void append(Object value, MarkupType markupType, Appendable out) throws IOException
Appends an object's String representation with markup enabled, supporting streaming for specialized types.- Throws:
IOException- See Also:
MarkupType
-
append
public static void append(Object value, MarkupType markupType, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Appendable out) throws IOException
Encodes an object's String representation with markup enabled using the provided encoder, supporting streaming for specialized types.- Parameters:
encodeLookupMarkup-Does the lookup markup need to be encoded?
When
encodeLookupMarkup = true:- Write markup prefix without encoding
- Write any encoder prefix
- Write value with encoding
- Write any encoder suffix
- Write markup suffix without encoding
When
encodeLookupMarkup = false:- Write any encoder prefix
- Write markup prefix with encoding
- Write value with encoding
- Write markup suffix with encoding
- Write any encoder suffix
encoder- no encoding performed when nullencoderPrefixSuffix- This includes the encoder prefix and suffix.- Throws:
IOException- See Also:
MarkupType
-
-