Class 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 encoding
      HtmlIterator​(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()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • 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 interface java.util.Iterator<HtmlElement>