class ReplyIterator
extends java.lang.Object
implements java.util.Iterator<java.lang.String>, java.lang.Iterable<java.lang.String>
BufferedReader and returns an Iterable<String>
which returns the individual lines from the reader.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
line |
private java.io.BufferedReader |
reader |
private java.lang.Exception |
savedException |
| Constructor and Description |
|---|
ReplyIterator(java.io.BufferedReader _reader) |
ReplyIterator(java.io.BufferedReader _reader,
boolean addDotReader) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
java.util.Iterator<java.lang.String> |
iterator() |
java.lang.String |
next() |
void |
remove() |
private final java.io.BufferedReader reader
private java.lang.String line
private java.lang.Exception savedException
ReplyIterator(java.io.BufferedReader _reader,
boolean addDotReader)
throws java.io.IOException
_reader - the reader to wrapaddDotReader - whether to additionally wrap the reader in a DotTerminatedMessageReaderjava.io.IOExceptionReplyIterator(java.io.BufferedReader _reader)
throws java.io.IOException
java.io.IOExceptionpublic boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.String>public java.lang.String next()
throws java.util.NoSuchElementException
next in interface java.util.Iterator<java.lang.String>java.util.NoSuchElementExceptionpublic void remove()
remove in interface java.util.Iterator<java.lang.String>public java.util.Iterator<java.lang.String> iterator()
iterator in interface java.lang.Iterable<java.lang.String>