@InterfaceAudience.Private @InterfaceStability.Evolving public class SimpleTextLineEventReader extends Object implements EventReader
EventReader
implementation which delegates to a
BufferedReader
.Constructor and Description |
---|
SimpleTextLineEventReader(Reader in) |
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. |
public SimpleTextLineEventReader(Reader in)
public Event readEvent() throws IOException
EventReader
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.readEvent
in interface EventReader
IOException
public List<Event> readEvents(int n) throws IOException
EventReader
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.readEvents
in interface EventReader
IOException
public void close() throws IOException
EventReader
close
in interface Closeable
close
in interface AutoCloseable
close
in interface EventReader
IOException
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.