Package org.apache.sling.commons.html
Class HtmlIterator
java.lang.Object
org.apache.sling.commons.html.HtmlIterator
- All Implemented Interfaces:
Iterator<HtmlElement>
Pull based iterator which processes an input stream and converts the stream
into a series of HtmlElement Tokens
-
Constructor Summary
ConstructorsConstructorDescriptionConvert InputStream into a series of HtmlElement tokens, using the systems default character encodingHtmlIterator(InputStream is, String encoding) Convert InputStream into a series of HtmlElement tokens, using the provided character encoding -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
HtmlIterator
Convert InputStream into a series of HtmlElement tokens, using the systems default character encoding- Parameters:
is-
-
HtmlIterator
Convert InputStream into a series of HtmlElement tokens, using the provided character encoding- Parameters:
is-encoding-
-
-
Method Details
-
hasNext
public boolean hasNext()searches for and indicates whether the next HtmlElement has been found.- Specified by:
hasNextin interfaceIterator<HtmlElement>
-
next
- Specified by:
nextin interfaceIterator<HtmlElement>
-