|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jmatchparser.util.csv.AbstractCSVReader
net.sf.jmatchparser.util.csv.CSVReader
public class CSVReader
Class to read data from a CSV (Comma Separated Value) file, supporting different separator characters and quoted values.
Constructor Summary | |
---|---|
CSVReader(BufferedReader br)
Create a new CSVReader that reads from the given buffered reader. |
|
CSVReader(InputStream in,
String charsetName)
Create a new CSVReader that reads from the given stream. |
|
CSVReader(Reader r)
Create a new CSVReader that reads from the given reader. |
Method Summary | |
---|---|
void |
close()
Close this reader. |
char |
getSeparator()
Return the separator character (usually comma, tab or semicolon), or 0 to auto-detect. |
String[] |
read()
Read a line from the CSV file. |
void |
setSeparator(char separator)
Set the separator character (usually comma, tab or semicolon), or 0 to auto-detect. |
void |
setStripComments(boolean stripComments)
Set whether comments (lines starting with # or empty lines) should be stripped. |
void |
setSupportFullyQuotedLines(boolean supportFullyQuotedLines)
Some broken CSV writers quote the whole line if no field of the line needs to be quoted. |
void |
setSupportMultiLineCells(boolean supportMutiLineCells)
Enable support for multi-line values in cells. |
Methods inherited from class net.sf.jmatchparser.util.csv.AbstractCSVReader |
---|
read, read, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSVReader(BufferedReader br)
CSVReader
that reads from the given buffered reader.
public CSVReader(Reader r)
CSVReader
that reads from the given reader.
public CSVReader(InputStream in, String charsetName) throws UnsupportedEncodingException
CSVReader
that reads from the given stream.
UnsupportedEncodingException
Method Detail |
---|
public char getSeparator()
public void setSeparator(char separator)
public void setStripComments(boolean stripComments)
public void setSupportFullyQuotedLines(boolean supportFullyQuotedLines)
public void setSupportMultiLineCells(boolean supportMutiLineCells)
public void close() throws IOException
AbstractCSVReader
close
in class AbstractCSVReader
IOException
public String[] read() throws IOException
AbstractCSVReader
read
in class AbstractCSVReader
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |