com.partnersoft.formats.csv
Class CsvDataRecordSource
java.lang.Object
com.partnersoft.io.AbstractIterableInput<Naming<java.lang.Object>>
com.partnersoft.io.DataRecordSource
com.partnersoft.formats.text.LineTextDataRecordSource
com.partnersoft.formats.csv.CsvDataRecordSource
- All Implemented Interfaces:
- Coggable, IterableInput<Naming<java.lang.Object>>, java.lang.Iterable<Naming<java.lang.Object>>
public class CsvDataRecordSource
- extends LineTextDataRecordSource
A comma-separated, line-delimited text data record source.
Copyright 2001-2007 Partner Software, Inc.
- Version:
- $Id: CsvDataRecordSource.java 2474 2010-03-13 14:28:43Z paul $
- Author:
- Paul Reavis
|
Method Summary |
DataRecordSource |
copy()
Makes a copy of this DataRecordSource, that you can iterate over
separately. |
void |
openImp()
Subclass implementation of guts of open() method. |
boolean |
parseLine(java.lang.String line)
Subclasses must implement this. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CsvDataRecordSource
public CsvDataRecordSource()
CsvDataRecordSource
public CsvDataRecordSource(java.lang.String path)
throws java.io.IOException
- Throws:
java.io.IOException
CsvDataRecordSource
public CsvDataRecordSource(VfsFile file)
CsvDataRecordSource
public CsvDataRecordSource(VfsFile file,
java.util.List<java.lang.String> fieldNames)
CsvDataRecordSource
public CsvDataRecordSource(VfsFile file,
java.lang.String... fieldNames)
CsvDataRecordSource
public CsvDataRecordSource(Cog state)
openImp
public void openImp()
throws java.lang.Exception
- Description copied from class:
AbstractIterableInput
- Subclass implementation of guts of open() method.
Subclasses must implement this to do the actual work required by open().
Feel free to throw exceptions; these are caught inside the open() itself
and applied to the exception variable. Thus, you can focus on the actual
task instead of paperwork.
- Overrides:
openImp in class LineTextDataRecordSource
- Throws:
java.lang.Exception
parseLine
public boolean parseLine(java.lang.String line)
throws java.lang.Exception
- Description copied from class:
LineTextDataRecordSource
- Subclasses must implement this. It should read the input string, representing a single
line of input, set the currentValues array in DataRecordSource,
and return true if successful.
- Specified by:
parseLine in class LineTextDataRecordSource
- Returns:
-
- Throws:
java.lang.Exception
copy
public DataRecordSource copy()
- Description copied from class:
DataRecordSource
- Makes a copy of this DataRecordSource, that you can iterate over
separately.
- Specified by:
copy in class DataRecordSource
- Returns:
- copy of this source