com.northconcepts.datapipeline.csv
Class CSVReader
java.lang.Object
com.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataReader
com.northconcepts.datapipeline.core.AbstractReader
com.northconcepts.datapipeline.core.TextReader
com.northconcepts.datapipeline.csv.CSVReader
public class CSVReader
- extends TextReader
Obtains records from a Comma Separated Value (CSV) stream.
| Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString |
CSVReader
public CSVReader(File file)
CSVReader
public CSVReader(Reader reader)
parse
public static Record parse(String line,
char fieldSeparator,
char quoteChar,
boolean allowMultiLineText)
- Utility method to quickly parse a line of text.
- Parameters:
line - the delimited line of text to parsefieldSeparator - quoteChar - allowMultiLineText -
- Returns:
getFieldSeparator
public char getFieldSeparator()
setFieldSeparator
public CSVReader setFieldSeparator(char columnSeparator)
getQuoteChar
public char getQuoteChar()
setQuoteChar
public CSVReader setQuoteChar(char quoteChar)
getNewLine
public String getNewLine()
setNewLine
public CSVReader setNewLine(String newLine)
isAllowMultiLineText
public boolean isAllowMultiLineText()
setAllowMultiLineText
public CSVReader setAllowMultiLineText(boolean allowMultiLineText)
isTrimFields
public boolean isTrimFields()
setTrimFields
public CSVReader setTrimFields(boolean trimFields)
addExceptionProperties
public DataException addExceptionProperties(DataException exception)
- Description copied from class:
DataEndpoint
- Adds this endpoint's current state to a
DataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.
- Overrides:
addExceptionProperties in class TextReader
fillRecord
protected boolean fillRecord(Record record)
throws Throwable
- Specified by:
fillRecord in class AbstractReader
- Throws:
Throwable
Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.