org.apache.flume.client.avro
Class BufferedLineReader

java.lang.Object
  extended by org.apache.flume.client.avro.BufferedLineReader
All Implemented Interfaces:
LineReader

public class BufferedLineReader
extends Object
implements LineReader

A LineReader implementation which delegates to a BufferedReader.


Constructor Summary
BufferedLineReader(Reader in)
           
 
Method Summary
 void close()
          Clean-up any state associated with this reader.
 void mark(int readAheadLimit)
           
 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.
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedLineReader

public BufferedLineReader(Reader in)
Method Detail

readLine

public String readLine()
                throws IOException
Description copied from interface: LineReader
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:
readLine in interface LineReader
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: LineReader
Clean-up any state associated with this reader.

Specified by:
close in interface LineReader
Throws:
IOException

readLines

public List<String> readLines(int n)
                       throws IOException
Description copied from interface: LineReader
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:
readLines in interface LineReader
Throws:
IOException

mark

public void mark(int readAheadLimit)
          throws IOException
Throws:
IOException

reset

public void reset()
           throws IOException
Throws:
IOException


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