com.ricebridge.csvman
Class CsvReader

java.lang.Object
  extended byjava.io.Reader
      extended bycom.ricebridge.csvman.CsvReader
All Implemented Interfaces:
CsvBuffer

public class CsvReader
extends Reader
implements CsvBuffer

Internal Class; wraps an Reader instance.

Records most recently read line.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
CsvReader(Reader pReader, int pLineBufferMaxLength)
          Wrap an Reader.
 
Method Summary
 void close()
           
 String endOfLine(String pEndOfLine)
          Find the last line input based on a set of end-of-line marking characters.
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] c)
           
 int read(char[] c, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.io.Reader
ready
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvReader

public CsvReader(Reader pReader,
                 int pLineBufferMaxLength)
Wrap an Reader.

Parameters:
pReader - Reader to wrap
pLineBufferMaxLength - maximum number of chars to store, or 0 if no limit
Method Detail

read

public int read()
         throws IOException
Throws:
IOException

read

public int read(char[] c)
         throws IOException
Throws:
IOException

read

public int read(char[] c,
                int off,
                int len)
         throws IOException
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

mark

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

reset

public void reset()
           throws IOException
Throws:
IOException

markSupported

public boolean markSupported()

endOfLine

public String endOfLine(String pEndOfLine)
Find the last line input based on a set of end-of-line marking characters. Used when a bad line occurs.

Specified by:
endOfLine in interface CsvBuffer
Parameters:
pEndOfLine - end-of-line characters


Copyright © 2003-2006 Ricebridge