Package org.apache.commons.net.nntp
Class ReplyIterator
java.lang.Object
org.apache.commons.net.nntp.ReplyIterator
Wraps a
BufferedReader and returns an Iterable<String> which returns the individual lines from the reader.- Since:
- 3.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplyIterator(BufferedReader _reader) ReplyIterator(BufferedReader _reader, boolean addDotReader) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
reader
-
line
-
savedException
-
-
Constructor Details
-
ReplyIterator
ReplyIterator(BufferedReader _reader) throws IOException - Throws:
IOException
-
ReplyIterator
ReplyIterator(BufferedReader _reader, boolean addDotReader) throws IOException - Parameters:
_reader- the reader to wrapaddDotReader- whether to additionally wrap the reader in a DotTerminatedMessageReader- Throws:
IOException
-
-
Method Details
-
hasNext
public boolean hasNext() -
iterator
-
next
- Specified by:
nextin interfaceIterator<String>- Throws:
NoSuchElementException
-
remove
public void remove()
-