com.metamatrix.script.io
Class StringLineReader

java.lang.Object
  extended by java.io.Reader
      extended by com.metamatrix.script.io.StringLineReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable
Direct Known Subclasses:
MetadataReader, ResultSetReader, StringArrayReader

public abstract class StringLineReader
extends java.io.Reader

Base class for any type of Reader, where data can be read as line by line. The derived classes just need to extend this class and implement the "nextLine()" method to get the full "Reader" functionality.

Author:
Ramesh Reddy

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
StringLineReader()
           
 
Method Summary
 void close()
           
protected abstract  java.lang.String nextLine()
          Get the next line of data from the data source.
 int read(char[] cbuf, int off, int len)
           
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, read, ready, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringLineReader

public StringLineReader()
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader
Throws:
java.io.IOException
Since:
4.3
See Also:
Reader.close()

read

public int read(char[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Specified by:
read in class java.io.Reader
Throws:
java.io.IOException
Since:
4.3
See Also:
Reader.read(char[], int, int)

nextLine

protected abstract java.lang.String nextLine()
                                      throws java.io.IOException
Get the next line of data from the data source.

Returns:
Throws:
java.io.IOException
Since:
4.3


Copyright © 2009. All Rights Reserved.