org.apache.flume.client.avro

## Class SimpleTextLineEventReader

- java.lang.Object
- - org.apache.flume.client.avro.SimpleTextLineEventReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, EventReader

      @InterfaceAudience.Private
      @InterfaceStability.Evolving
      public class SimpleTextLineEventReader
      extends Object
      implements EventReader

  A `EventReader` implementation which delegates to a `BufferedReader`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleTextLineEventReader(Reader in)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Clean-up any state associated with this reader.
    `Event` | `readEvent()` Get the next line associated with the input stream.
    `List<Event>` | `readEvents(int n)` Get up to `n` lines associated with the input stream.

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

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

- - ### Constructor Detail

    - #### SimpleTextLineEventReader

          public SimpleTextLineEventReader(Reader in)

  - ### Method Detail

    - #### readEvent

          public Event readEvent()
                          throws IOException

      Description copied from interface: `EventReader`
      Get the next line associated with the input stream. If this returns `null`, the input underlying input source is considered finished. Note that this is allowed to block for indefinite amounts of time waiting to generate a new line.
      Specified by:
        `readEvent` in interface `EventReader`
      Throws:
        `IOException`

    - #### readEvents

          public List<Event> readEvents(int n)
                                 throws IOException

      Description copied from interface: `EventReader`
      Get up to `n` lines associated with the input stream. If this returns less than n lines, the input underlying input source is considered finished. Note that this is allowed to block for indefinite amounts of time waiting to generate a new line.
      Specified by:
        `readEvents` in interface `EventReader`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Description copied from interface: `EventReader`
      Clean-up any state associated with this reader.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `EventReader`
      Throws:
        `IOException`

Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.