gnu.inet.nntp
Class LineIterator

java.lang.Object
  extended by gnu.inet.nntp.LineIterator
All Implemented Interfaces:
PendingData, java.util.Iterator
Direct Known Subclasses:
ActiveTimesIterator, ArticleNumberIterator, GroupIterator, HeaderIterator, OverviewIterator, PairIterator

public class LineIterator
extends java.lang.Object
implements java.util.Iterator, PendingData

An iterator over an NNTP multi-line response.

Author:
Chris Burdess

Method Summary
 boolean hasNext()
          Indicates whether there are more lines to be read.
 java.lang.Object next()
          Returns the next line.
 java.lang.String nextLine()
          Returns the next line.
 void readToEOF()
          Read to the end of this iterator.
 void remove()
          This iterator is read-only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Indicates whether there are more lines to be read.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Returns the next line.

Specified by:
next in interface java.util.Iterator

nextLine

public java.lang.String nextLine()
                          throws java.io.IOException
Returns the next line.

Throws:
java.io.IOException

remove

public void remove()
This iterator is read-only.

Specified by:
remove in interface java.util.Iterator

readToEOF

public void readToEOF()
               throws java.io.IOException
Read to the end of this iterator.

Specified by:
readToEOF in interface PendingData
Throws:
java.io.IOException - if an I/O error occurred


© Copyright 2003 The Free Software Foundation, all rights reserved