Package com.day.cq.rewriter.htmlparser
Class HtmlParser
- java.lang.Object
-
- java.io.Writer
-
- com.day.cq.rewriter.htmlparser.HtmlParser
-
- All Implemented Interfaces:
Generator,Closeable,Flushable,Appendable,AutoCloseable
@Deprecated public class HtmlParser extends Writer implements Generator
Deprecated.HTML parser. Invokes aDocumentHandlerwhenever an event occurs.
-
-
Field Summary
Fields Modifier and Type Field Description static StringINCLUDE_TAGS_PROPERTYDeprecated.
-
Constructor Summary
Constructors Constructor Description HtmlParser()Deprecated.Default constructor.HtmlParser(String[] includedTags)Deprecated.HtmlParser(String[] includedTags, boolean preserveCamelCase)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.voidfinished()Deprecated.Finish the parsing process.voidflush()Deprecated.Set<String>getTagInclusionSet()Deprecated.PrintWritergetWriter()Deprecated.Get the writer to write the output to.voidinit(ProcessingContext pipelineContext, ProcessingComponentConfiguration config)Deprecated.Initialize this component.booleanisEmpty()Deprecated.Return a flag indicating whether the parser has still some undigested characters left.voidsetContentHandler(ContentHandler handler)Deprecated.Set the content handler the generator should stream to.voidsetDocumentHandler(DocumentHandler documentHandler)Deprecated.Set document handler.voidsetTagInclusionSet(Set<String> tagInclusionSet)Deprecated.voidupdate(char[] buf, int off, int len)Deprecated.Feed characters to the parser.voidwrite(char[] cbuf, int off, int len)Deprecated.voidwrite(int b)Deprecated.
-
-
-
Field Detail
-
INCLUDE_TAGS_PROPERTY
public static final String INCLUDE_TAGS_PROPERTY
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(ProcessingContext pipelineContext, ProcessingComponentConfiguration config)
Deprecated.Description copied from interface:GeneratorInitialize this component.- Specified by:
initin interfaceGenerator- Parameters:
pipelineContext- The invocation context.config- The configuration for this component.- See Also:
Generator.init(com.day.cq.rewriter.processor.ProcessingContext, com.day.cq.rewriter.processor.ProcessingComponentConfiguration)
-
getWriter
public PrintWriter getWriter()
Deprecated.Description copied from interface:GeneratorGet the writer to write the output to.- Specified by:
getWriterin interfaceGenerator- Returns:
- A print writer.
- See Also:
Generator.getWriter()
-
setContentHandler
public void setContentHandler(ContentHandler handler)
Deprecated.Description copied from interface:GeneratorSet the content handler the generator should stream to.- Specified by:
setContentHandlerin interfaceGenerator- Parameters:
handler- A transformer or serializer.- See Also:
Generator.setContentHandler(org.xml.sax.ContentHandler)
-
setDocumentHandler
public void setDocumentHandler(DocumentHandler documentHandler)
Deprecated.Set document handler. Allows a component to get notified about the events, before characters are decomposed into attributes.- Parameters:
documentHandler- document handler
-
write
public void write(char[] cbuf, int off, int len) throws IOExceptionDeprecated.- Specified by:
writein classWriter- Throws:
IOException
-
write
public void write(int b) throws IOExceptionDeprecated.- Overrides:
writein classWriter- Throws:
IOException
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
public void flush() throws IOExceptionDeprecated.- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
update
public void update(char[] buf, int off, int len) throws IOExceptionDeprecated.Feed characters to the parser.- Parameters:
buf- character bufferoff- offset where characters startlen- length of affected buffer- Throws:
IOException-IOException
-
isEmpty
public boolean isEmpty()
Deprecated.Return a flag indicating whether the parser has still some undigested characters left.- Returns:
trueif the parser still contains charactersfalseotherwise
-
finished
public void finished() throws IOExceptionDeprecated.Finish the parsing process. This forces the parser to flush the characters still held in its internal buffer, regardless of the parsing state.- Specified by:
finishedin interfaceGenerator- Throws:
IOException-IOException
-
-