Package org.htmlcleaner
Class HtmlSerializer
- java.lang.Object
-
- org.htmlcleaner.Serializer
-
- org.htmlcleaner.HtmlSerializer
-
- Direct Known Subclasses:
CompactHtmlSerializer
,PrettyHtmlSerializer
,SimpleHtmlSerializer
public abstract class HtmlSerializer extends Serializer
Abstract HTML serializer - contains common logic for descendants.
-
-
Field Summary
-
Fields inherited from class org.htmlcleaner.Serializer
props
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HtmlSerializer(CleanerProperties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
dontEscape(TagNode tagNode)
protected java.lang.String
escapeText(java.lang.String content)
protected boolean
isMinimizedTagSyntax(TagNode tagNode)
protected void
serializeEndTag(TagNode tagNode, java.io.Writer writer, boolean newLine)
protected void
serializeOpenTag(TagNode tagNode, java.io.Writer writer, boolean newLine)
-
Methods inherited from class org.htmlcleaner.Serializer
getAsString, getAsString, getAsString, getAsString, getAsString, isScriptOrStyle, serialize, write, write, writeToFile, writeToFile, writeToFile, writeToFile, writeToStream, writeToStream, writeToStream, writeToStream
-
-
-
-
Constructor Detail
-
HtmlSerializer
protected HtmlSerializer(CleanerProperties props)
-
-
Method Detail
-
isMinimizedTagSyntax
protected boolean isMinimizedTagSyntax(TagNode tagNode)
-
dontEscape
protected boolean dontEscape(TagNode tagNode)
-
escapeText
protected java.lang.String escapeText(java.lang.String content)
-
serializeOpenTag
protected void serializeOpenTag(TagNode tagNode, java.io.Writer writer, boolean newLine) throws java.io.IOException
- Throws:
java.io.IOException
-
serializeEndTag
protected void serializeEndTag(TagNode tagNode, java.io.Writer writer, boolean newLine) throws java.io.IOException
- Throws:
java.io.IOException
-
-