- java.lang.Object
-
- com.aoapps.hodgepodge.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, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Appendable out, boolean outOptimized)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 voidappend(Object value, MarkupType markupType, Appendable out, boolean outOptimized)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, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Writer out, boolean outOptimized)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.static voidwrite(Object value, MarkupType markupType, Writer out, boolean outOptimized)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, Writer out, boolean outOptimized) throws IOException
Writes an object's String representation with markup enabled, supporting streaming for specialized types.- Parameters:
outOptimized- Isoutalready known to have been passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)(withencoder = null)?- 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
Value is not used when
encoder == null.encoder- no encoding performed when null, and values ofencodeLookupMarkupandencoderPrefixSuffixare not used.encoderPrefixSuffix- This includes the encoder prefix and suffix.Value is not used when
encoder == null.- Throws:
IOException- See Also:
MarkupType
-
write
public static void write(Object value, MarkupType markupType, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Writer out, boolean outOptimized) 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
Value is not used when
encoder == null.encoder- no encoding performed when null, and values ofencodeLookupMarkupandencoderPrefixSuffixare not used.encoderPrefixSuffix- This includes the encoder prefix and suffix.Value is not used when
encoder == null.outOptimized- Isoutalready known to have been passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)?- 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, Appendable out, boolean outOptimized) throws IOException
Appends an object's String representation with markup enabled, supporting streaming for specialized types.- Parameters:
outOptimized- Isoutalready known to have been passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)(withencoder = null)?- 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
Value is not used when
encoder == null.encoder- no encoding performed when null, and values ofencodeLookupMarkupandencoderPrefixSuffixare not used.encoderPrefixSuffix- This includes the encoder prefix and suffix.Value is not used when
encoder == null.- Throws:
IOException- See Also:
MarkupType
-
append
public static void append(Object value, MarkupType markupType, boolean encodeLookupMarkup, Encoder encoder, boolean encoderPrefixSuffix, Appendable out, boolean outOptimized) 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
Value is not used when
encoder == null.encoder- no encoding performed when null, and values ofencodeLookupMarkupandencoderPrefixSuffixare not used.encoderPrefixSuffix- This includes the encoder prefix and suffix.Value is not used when
encoder == null.outOptimized- Isoutalready known to have been passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)?- Throws:
IOException- See Also:
MarkupType
-
-