com.ricebridge.csvman
Class AsListsLineListener

java.lang.Object
  extended bycom.ricebridge.csvman.LineListenerSupportImpl
      extended bycom.ricebridge.csvman.CustomLineListener
          extended bycom.ricebridge.csvman.BasicLineListener
              extended bycom.ricebridge.csvman.AsListsLineListener
All Implemented Interfaces:
LineListener
Direct Known Subclasses:
BadLineTest.FailingListener

public class AsListsLineListener
extends BasicLineListener

Simple implementation of LineListener that stores loaded data lines as a List of Lists of Strings.

The easiest way to get your CSV data in this format is to use the CsvManager.loadAsLists method.

AsListsLineListener is designed to be subclassed. You can change the default implementation by calling the CsvManagerStore.setAsListsLineListenerClass method, and providing a subclass of AsListsLineListener. CsvManagerStore can be accessed using CsvManager.getCsvManagerStore().

The Source Code of this Java class is available under a BSD-style license.

See Also:
LineListener, CustomLineListener, BasicLineListener, ResultSetLineListener, TableModelLineListener, BeanLineListener

Field Summary
 
Fields inherited from class com.ricebridge.csvman.BasicLineListener
iData
 
Constructor Summary
AsListsLineListener()
           
 
Method Summary
protected  BadLine handleLineImpl(String[] pLine, int pNumFields, long pLineNumber, String pOriginalLine)
          Handle each data line by converting pLine into a List and storing it in the list of lines.
 
Methods inherited from class com.ricebridge.csvman.BasicLineListener
endProcessImpl, getData, startProcessImpl
 
Methods inherited from class com.ricebridge.csvman.CustomLineListener
handleBadLineImpl, setCsvSpecImpl, setLineSpecImpl
 
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
 

Constructor Detail

AsListsLineListener

public AsListsLineListener()
Method Detail

handleLineImpl

protected BadLine handleLineImpl(String[] pLine,
                                 int pNumFields,
                                 long pLineNumber,
                                 String pOriginalLine)
                          throws Exception
Handle each data line by converting pLine into a List and storing it in the list of lines.

Overrides:
handleLineImpl in class BasicLineListener
Throws:
Exception


Copyright © 2003-2006 Ricebridge