org.apache.commons.net.nntp

## Class ReplyIterator

- java.lang.Object
- - org.apache.commons.net.nntp.ReplyIterator

- All Implemented Interfaces:
    Iterable<String>, Iterator<String>

      final class ReplyIterator
      extends Object
      implements Iterator<String>, Iterable<String>

  Wraps a `BufferedReader` and returns an `Iterable<String>` which returns the individual lines from the reader.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReplyIterator(BufferedReader _reader)`
    `ReplyIterator(BufferedReader _reader, boolean addDotReader)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `Iterator<String>` | `iterator()`
    `String` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### ReplyIterator

          ReplyIterator(BufferedReader _reader)
                 throws IOException

      Throws:
        `IOException`

    - #### ReplyIterator

          ReplyIterator(BufferedReader _reader,
                        boolean addDotReader)
                 throws IOException

      Parameters:
        `_reader` - the reader to wrap
        `addDotReader` - whether to additionally wrap the reader in a DotTerminatedMessageReader
      Throws:
        `IOException`

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<String>`

    - #### iterator

          public Iterator<String> iterator()

      Specified by:
        `iterator` in interface `Iterable<String>`

    - #### next

          public String next()
                      throws NoSuchElementException

      Specified by:
        `next` in interface `Iterator<String>`
      Throws:
        `NoSuchElementException`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<String>`