Package org.apache.juneau.marshall.html
Class HtmlWriter<SELF extends HtmlWriter<SELF>>
java.lang.Object
java.io.Writer
org.apache.juneau.marshall.serializer.SerializerWriter<SELF>
org.apache.juneau.marshall.xml.XmlWriter<SELF>
org.apache.juneau.marshall.html.HtmlWriter<SELF>
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
BasicHtmlWriter,SimpleHtmlWriter
Specialized writer for serializing HTML.
See Also:
-
Field Summary
Fields inherited from class org.apache.juneau.marshall.serializer.SerializerWriter
maxIndent, out, quoteChar, trimStrings, uriResolver, useWhitespace -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHtmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar, UriResolver uriResolver) Constructor.protectedHtmlWriter(HtmlWriter<?> w) Copy constructor. -
Method Summary
Methods inherited from class org.apache.juneau.marshall.xml.XmlWriter
attr, attr, attr, attr, attr, attrUri, attrUri, attrUri, attrValue, ceTag, cTag, eTag, eTag, eTag, eTag, eTag, eTag, oAttr, oAttr, oTag, oTag, oTag, oTag, oTag, oTag, sTag, sTag, sTag, sTag, sTag, sTag, tag, tag, tag, tag, tag, tag, text, textUri, toString
-
Constructor Details
-
HtmlWriter
Copy constructor.- Parameters:
w- Writer being copied.
-
HtmlWriter
protected HtmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar, UriResolver uriResolver) Constructor.- Parameters:
out- The writer being wrapped.useWhitespace- Iftrue , tabs will be used in output.maxIndent- The maximum indentation level.trimStrings- Iftrue , strings should be trimmed before they're serialized.quoteChar- The quote character to use (i.e.'\'' or'"' )uriResolver- The URI resolver for resolving URIs to absolute or root-relative form.
-
-
Method Details
-
cr
Description copied from class:SerializerWriterPerforms a carriage return.Adds a newline and the specified number of tabs (if the
useWhitespacesetting is enabled) to the output.- Overrides:
crin classSerializerWriter<SELF extends HtmlWriter<SELF>>- Parameters:
depth- The indentation.- Returns:
- This object.
-
cre
Description copied from class:SerializerWriterPerforms a carriage return at the end of a line.Adds a newline and the specified number of tabs (if the
useWhitespacesetting is enabled) to the output.- Overrides:
crein classSerializerWriter<SELF extends HtmlWriter<SELF>>- Parameters:
depth- The indentation.- Returns:
- This object.
-
text
Description copied from class:XmlWriterSerializes and encodes the specified object as valid XML text.- Overrides:
textin classXmlWriter<SELF extends HtmlWriter<SELF>>- Parameters:
o- The object being serialized.preserveWhitespace- Iftrue , then we're serializingXmlFormat.MIXED_PWSorXmlFormat.TEXT_PWScontent.- Returns:
- This object.
-