Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.util
Interface PeekingIterator

All Superinterfaces:
  NodeIterator

All Known Implementing Classes:
  PeekingIteratorImpl

Deprecated. shouldn't need to pre-read tags.

public interface PeekingIterator
extends NodeIterator

Method Summary
`Node` | `peek()` Deprecated. Fetch a node without consuming it.

Methods inherited from interface org.htmlparser.util.NodeIterator
`hasMoreNodes, nextNode`

Method Detail

### peek

    public Node peek()
              throws ParserException

  Deprecated.
  Fetch a node without consuming it. Subsequent calls to `peek()` will return subsequent nodes. The node returned by `peek()` will never be a node already consumed by `nextHTMLNode()`.

  For example, say there are nodes <H1><H2><H3><H4><H5>, this is the nodes that would be returned for the indicated calls:

       peek()         H1
       peek()         H2
       nextHTMLNode() H1
       peek()         H3
       nextHTMLNode() H2
       nextHTMLNode() H3
       nextHTMLNode() H4
       peek()         H5

  Returns:
    The next node that would be returned by `nextHTMLNode()` or the node after the last node returned by `peek()`, whichever is later in the stream. or null if there are no more nodes available via the above rules.
  Throws:
    `ParserException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.