org.sadun.util
Class HTMLAnchorIterator

java.lang.Object
  extended byorg.sadun.util.HTMLAnchorIterator
All Implemented Interfaces:
java.util.Iterator

public class HTMLAnchorIterator
extends java.lang.Object
implements java.util.Iterator

A class to efficiently parse and find anchors in an HTML stream.

Version:
1.0
Author:
Cristiano Sadun

Nested Class Summary
 class HTMLAnchorIterator.URLsCollection
          A classt to hold the results of a HTMLAnchorIterator HTMLAnchorIterator#getURLs()operation, containing both string URLs which can be successfully translated to URL objects and ones which can't.
 
Constructor Summary
HTMLAnchorIterator(java.io.Reader r)
          Create an anchor iterator over the given reader.
 
Method Summary
 HTMLAnchorIterator.URLsCollection getURLs(java.net.URL context)
           
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLAnchorIterator

public HTMLAnchorIterator(java.io.Reader r)
Create an anchor iterator over the given reader.

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

getURLs

public HTMLAnchorIterator.URLsCollection getURLs(java.net.URL context)
                                          throws java.io.IOException
Throws:
java.io.IOException