public class CSVRecordReader extends Object implements iRecordReader
| Constructor and Description |
|---|
CSVRecordReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFieldSeparator(String sep) |
void |
close() |
void |
defineFields(String fields)
Defines fieldnames using a comma or semicolon separated field name string.
|
iInputField |
find(String name)
Locates the specified field in the current record.
|
int |
getCurrentRecNr() |
iInputField |
getField(int ix) |
int |
getIntValue(String name) |
int |
getIntValue(String name,
int def) |
String |
getLine() |
long |
getLongValue(String name) |
long |
getLongValue(String name,
long def) |
String |
getValue(int ix) |
String |
getValue(String name) |
boolean |
isEmptyLine() |
boolean |
nextRecord()
Read the next (or first) record from the input and prepare it for
processing.
|
void |
open(Reader r,
String name) |
void |
setEscapeBackslash(boolean escapeBackslash) |
void |
setEscapeBadly(boolean escapeBadly) |
void |
setEscapeDupQuote(boolean escapeDupQuote) |
void |
setFieldSeparator(String sep) |
void |
setIgnoreQuotes(boolean ignoreQuotes) |
void |
setSkipWhitespace(boolean skip_ws)
When T, whitespace between fields is skipped
|
void |
setStartWithFieldNames(boolean startWithFieldNames) |
int |
size() |
public void open(Reader r, String name) throws Exception
open in interface iRecordReaderExceptionpublic void close()
throws Exception
close in interface iRecordReaderExceptionpublic int getCurrentRecNr()
getCurrentRecNr in interface iRecordReaderpublic void setFieldSeparator(String sep)
public void addFieldSeparator(String sep)
public void setSkipWhitespace(boolean skip_ws)
public void setIgnoreQuotes(boolean ignoreQuotes)
public void setEscapeBackslash(boolean escapeBackslash)
public void setEscapeDupQuote(boolean escapeDupQuote)
public void setStartWithFieldNames(boolean startWithFieldNames)
public void setEscapeBadly(boolean escapeBadly)
public boolean nextRecord()
throws IOException
nextRecord in interface iRecordReaderIOExceptionpublic boolean isEmptyLine()
public final String getLine()
public void defineFields(String fields)
fields - public iInputField getField(int ix)
getField in interface iRecordReaderpublic int size()
size in interface iRecordReaderpublic iInputField find(String name)
iRecordReaderfind in interface iRecordReaderpublic String getValue(int ix)
public int getIntValue(String name) throws IOException
IOExceptionpublic int getIntValue(String name, int def) throws IOException
IOExceptionpublic long getLongValue(String name) throws IOException
IOExceptionpublic long getLongValue(String name, long def) throws IOException
IOExceptionCopyright © 2017 etc.to. All rights reserved.