Package org.apache.sling.commons.html
Class HtmlIterator
- java.lang.Object
-
- org.apache.sling.commons.html.HtmlIterator
-
- All Implemented Interfaces:
java.util.Iterator<HtmlElement>
public class HtmlIterator extends java.lang.Object implements java.util.Iterator<HtmlElement>
Pull based iterator which processes an input stream and converts the stream into a series of HtmlElement Tokens
-
-
Constructor Summary
Constructors Constructor Description HtmlIterator(java.io.InputStream is)
Convert InputStream into a series of HtmlElement tokens, using the systems default character encodingHtmlIterator(java.io.InputStream is, java.lang.String encoding)
Convert InputStream into a series of HtmlElement tokens, using the provided character encoding
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
searches for and indicates whether the next HtmlElement has been found.HtmlElement
next()
-
-
-
Constructor Detail
-
HtmlIterator
public HtmlIterator(java.io.InputStream is)
Convert InputStream into a series of HtmlElement tokens, using the systems default character encoding- Parameters:
is
-
-
HtmlIterator
public HtmlIterator(java.io.InputStream is, java.lang.String encoding)
Convert InputStream into a series of HtmlElement tokens, using the provided character encoding- Parameters:
is
-encoding
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
searches for and indicates whether the next HtmlElement has been found.- Specified by:
hasNext
in interfacejava.util.Iterator<HtmlElement>
-
next
public HtmlElement next()
- Specified by:
next
in interfacejava.util.Iterator<HtmlElement>
-
-