org.apache.flume.client.avro
Interface LineReader

All Known Implementing Classes:
BufferedLineReader, SpoolingFileLineReader

public interface LineReader

A line reader produces a stream of lines for the AvroCLIClient to ingest into Flume. The stream may be finite or infinite.


Method Summary
 void close()
          Clean-up any state associated with this reader.
 String readLine()
          Get the next line associated with the input stream.
 List<String> readLines(int n)
          Get up to n lines associated with the input stream.
 

Method Detail

readLine

String readLine()
                throws IOException
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.

Throws:
IOException

readLines

List<String> readLines(int n)
                       throws IOException
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.

Throws:
IOException

close

void close()
           throws IOException
Clean-up any state associated with this reader.

Throws:
IOException


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