com.ricebridge.csvman.in
Class BasicCsvLoader.LoaderLineListener

java.lang.Object
  extended bycom.ricebridge.csvman.LineListenerSupportImpl
      extended bycom.ricebridge.csvman.CustomLineListener
          extended bycom.ricebridge.csvman.in.BasicCsvLoader.LoaderLineListener
All Implemented Interfaces:
LineListener
Enclosing class:
BasicCsvLoader

public static final class BasicCsvLoader.LoaderLineListener
extends CustomLineListener

Internal Class; stores most recent data line.


Field Summary
 String[] EMPTY_LINE
           
 BadLine iBadLine
          Most recent bad line.
 String[] iLine
          Most recent data line.
 
Constructor Summary
BasicCsvLoader.LoaderLineListener()
           
 
Method Summary
 void emptyLine()
           
 void handleBadLineImpl(BadLine pBadLine)
          Store next bad line.
 BadLine handleLineImpl(String[] pLine, int pNumFields, long pLineNumber, String pOriginalLine)
          Store next line of data.
 
Methods inherited from class com.ricebridge.csvman.CustomLineListener
endProcessImpl, setCsvSpecImpl, setLineSpecImpl, startProcessImpl
 
Methods inherited from class com.ricebridge.csvman.LineListenerSupportImpl
endProcess, handleBadLine, handleLine, setCsvSpec, setLineSpec, startProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_LINE

public String[] EMPTY_LINE

iLine

public String[] iLine
Most recent data line.


iBadLine

public BadLine iBadLine
Most recent bad line.

Constructor Detail

BasicCsvLoader.LoaderLineListener

public BasicCsvLoader.LoaderLineListener()
Method Detail

emptyLine

public void emptyLine()

handleLineImpl

public BadLine handleLineImpl(String[] pLine,
                              int pNumFields,
                              long pLineNumber,
                              String pOriginalLine)
                       throws Exception
Store next line of data.

Specified by:
handleLineImpl in class CustomLineListener
Parameters:
pLine - String values of data fields in line
pNumFields - Number of data fields actually found on the current line
pLineNumber - Count of lines processed so far.
pOriginalLine - Text of original data line from data source
Returns:
null if line is OK, BadLine object if line was bad in some way
Throws:
Exception
See Also:
LineListener.handleLine, BadLine, handleBadLineImpl

handleBadLineImpl

public void handleBadLineImpl(BadLine pBadLine)
Store next bad line.

Overrides:
handleBadLineImpl in class CustomLineListener
Parameters:
pBadLine - BadLine object describing the error
See Also:
LineListener.handleBadLine, handleLineImpl


Copyright © 2003-2006 Ricebridge