com.agimatec.utility.fileimport
Class StringLineReader

java.lang.Object
  extended by com.agimatec.utility.fileimport.StringLineReader
All Implemented Interfaces:
LineReader<String>

public class StringLineReader
extends Object
implements LineReader<String>

Description: read a file line by line (each line is a string)
User: roman.stumm
Date: 11.06.2008
Time: 17:43:00
Copyright: Agimatec GmbH


Field Summary
protected  BufferedReader lineReader
           
 
Constructor Summary
StringLineReader()
           
 
Method Summary
 void close()
           
 String readLine()
           
 void setReader(Reader aReader)
           
 void setStream(InputStream aReader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineReader

protected BufferedReader lineReader
Constructor Detail

StringLineReader

public StringLineReader()
Method Detail

setReader

public void setReader(Reader aReader)
Specified by:
setReader in interface LineReader<String>

setStream

public void setStream(InputStream aReader)
               throws IOException
Specified by:
setStream in interface LineReader<String>
Throws:
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface LineReader<String>
Returns:
the next line or null if no more lines available.
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface LineReader<String>
Throws:
IOException


Copyright © 2008-2011. All Rights Reserved.