| Modifier and Type | Field and Description |
|---|---|
static int |
ESCAPE_MODE_BACKSLASH |
static int |
ESCAPE_MODE_DOUBLED |
| Constructor and Description |
|---|
CsvReader(InputStream inputStream,
char delimiter,
Charset charset) |
CsvReader(InputStream inputStream,
Charset charset) |
CsvReader(Reader inputStream) |
CsvReader(Reader inputStream,
char delimiter) |
CsvReader(String fileName) |
CsvReader(String fileName,
char delimiter) |
CsvReader(String fileName,
char delimiter,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
finalize() |
String |
get(int columnIndex) |
String |
get(String headerName) |
boolean |
getCaptureRawRecord() |
int |
getColumnCount() |
char |
getComment() |
long |
getCurrentRecord() |
char |
getDelimiter() |
int |
getEscapeMode() |
String |
getHeader(int columnIndex) |
int |
getHeaderCount() |
String[] |
getHeaders() |
int |
getIndex(String headerName) |
String |
getRawRecord() |
char |
getRecordDelimiter() |
boolean |
getSafetySwitch() |
boolean |
getSkipEmptyRecords() |
char |
getTextQualifier() |
boolean |
getTrimWhitespace() |
boolean |
getUseComments() |
boolean |
getUseTextQualifier() |
String[] |
getValues() |
boolean |
isQualified(int columnIndex) |
static void |
main(String[] args) |
static CsvReader |
parse(String data) |
boolean |
readHeaders() |
boolean |
readRecord() |
void |
setCaptureRawRecord(boolean captureRawRecord) |
void |
setComment(char comment) |
void |
setDelimiter(char delimiter) |
void |
setEscapeMode(int escapeMode) |
void |
setHeaders(String[] hdrs) |
void |
setRecordDelimiter(char recordDelimiter) |
void |
setSafetySwitch(boolean safetySwitch) |
void |
setSkipEmptyRecords(boolean skipEmptyRecords) |
void |
setTextQualifier(char textQualifier) |
void |
setTrimWhitespace(boolean trimWhitespace) |
void |
setUseComments(boolean useComments) |
void |
setUseTextQualifier(boolean useTextQualifier) |
boolean |
skipLine() |
boolean |
skipRecord() |
public static final int ESCAPE_MODE_DOUBLED
public static final int ESCAPE_MODE_BACKSLASH
public CsvReader(String fileName, char delimiter, Charset charset) throws FileNotFoundException
FileNotFoundExceptionpublic CsvReader(String fileName, char delimiter) throws FileNotFoundException
FileNotFoundExceptionpublic CsvReader(String fileName) throws FileNotFoundException
FileNotFoundExceptionpublic CsvReader(InputStream inputStream, char delimiter, Charset charset)
public CsvReader(InputStream inputStream, Charset charset)
public boolean getCaptureRawRecord()
public void setCaptureRawRecord(boolean captureRawRecord)
public String getRawRecord()
public boolean getTrimWhitespace()
public void setTrimWhitespace(boolean trimWhitespace)
public char getDelimiter()
public void setDelimiter(char delimiter)
public char getRecordDelimiter()
public void setRecordDelimiter(char recordDelimiter)
public char getTextQualifier()
public void setTextQualifier(char textQualifier)
public boolean getUseTextQualifier()
public void setUseTextQualifier(boolean useTextQualifier)
public char getComment()
public void setComment(char comment)
public boolean getUseComments()
public void setUseComments(boolean useComments)
public int getEscapeMode()
public void setEscapeMode(int escapeMode) throws IllegalArgumentException
IllegalArgumentExceptionpublic boolean getSkipEmptyRecords()
public void setSkipEmptyRecords(boolean skipEmptyRecords)
public boolean getSafetySwitch()
public void setSafetySwitch(boolean safetySwitch)
public int getColumnCount()
public long getCurrentRecord()
public int getHeaderCount()
public String[] getHeaders() throws IOException
IOExceptionpublic void setHeaders(String[] hdrs)
public String[] getValues() throws IOException
IOExceptionpublic String get(int columnIndex) throws IOException
IOExceptionpublic String get(String headerName) throws IOException
IOExceptionpublic boolean readRecord() throws IOException
IOExceptionpublic boolean readHeaders() throws IOException
IOExceptionpublic String getHeader(int columnIndex) throws IOException
IOExceptionpublic boolean isQualified(int columnIndex) throws IOException
IOExceptionpublic int getIndex(String headerName) throws IOException
IOExceptionpublic boolean skipRecord() throws IOException
IOExceptionpublic boolean skipLine() throws IOException
IOExceptionpublic void close()