| Modifier and Type | Field and Description |
|---|---|
| private BufferedReader | |
| public static final int | DEFAULT_SKIP_LINES
The default line to start reading. |
| private boolean | |
| private boolean | |
| private CSVParser | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | CSVReader(Reader
the reader to an underlying CSV source. reader, char the delimiter to use for separating entries separator, char the character to use for quoted elements quotechar, boolean sets if characters outside the quotes are ignored strictQuotes)Constructs CSVReader with supplied separator, quote char and quote handling behavior. |
| public | CSVReader(Reader
the reader to an underlying CSV source. reader, char the delimiter to use for separating entries separator, char the character to use for quoted elements quotechar, char the character to use for escaping a separator or quote escape)Constructs CSVReader with supplied separator and quote char. |
| public | |
| public | CSVReader(Reader
the reader to an underlying CSV source. reader, char the delimiter to use for separating entries separator, char the character to use for quoted elements quotechar, char the character to use for escaping a separator or quote escape, int the line number to skip for start reading line)Constructs CSVReader with supplied separator and quote char. |
| public | CSVReader(Reader
the reader to an underlying CSV source. reader, char the delimiter to use for separating entries separator, char the character to use for quoted elements quotechar, char the character to use for escaping a separator or quote escape, int the line number to skip for start reading line, boolean sets if characters outside the quotes are ignored strictQuotes)Constructs CSVReader with supplied separator and quote char. |
| public | CSVReader(Reader
the reader to an underlying CSV source. reader, char the delimiter to use for separating entries separator, char the character to use for quoted elements quotechar, char the character to use for escaping a separator or quote escape, int the line number to skip for start reading line, boolean sets if characters outside the quotes are ignored strictQuotes, boolean it true, parser should ignore white space
before a quote in a field ignoreLeadingWhiteSpace)Constructs CSVReader with supplied separator and quote char. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private String | Returns: the next line from the file without trailing newlineReads the next line from the file. |
| public boolean | |
| public String[] | |
| public List | Returns: a List of String[], with each String[] representing a line of the file.Reads the entire file into a List with each element being a String[] of tokens. |
| public String[] | Returns: a string array with each comma-separated element as a separate entry.Reads the next line from the buffer and converts to a string array. |
| public void | remove()
Overrides default java. |
| br | back to summary |
|---|---|
| private BufferedReader br | |
| DEFAULT_SKIP_LINES | back to summary |
|---|---|
| public static final int DEFAULT_SKIP_LINES The default line to start reading. | |
| hasNext | back to summary |
|---|---|
| private boolean hasNext | |
| linesSkiped | back to summary |
|---|---|
| private boolean linesSkiped | |
| parser | back to summary |
|---|---|
| private CSVParser parser | |
| skipLines | back to summary |
|---|---|
| private int skipLines | |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader) Constructs CSVReader using a comma for the separator.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator) Constructs CSVReader with supplied separator.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar) Constructs CSVReader with supplied separator and quote char.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar, boolean strictQuotes) Constructs CSVReader with supplied separator, quote char and quote handling behavior.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar, char escape) Constructs CSVReader with supplied separator and quote char.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar, int line) Constructs CSVReader with supplied separator and quote char.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar, char escape, int line) Constructs CSVReader with supplied separator and quote char.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes) Constructs CSVReader with supplied separator and quote char.
| |
| CSVReader | back to summary |
|---|---|
| public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) Constructs CSVReader with supplied separator and quote char.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Closes the underlying reader.
| |
| getNextLine | back to summary |
|---|---|
| private String getNextLine() throws IOException Reads the next line from the file.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public String[] next() Implements java. Doc from java. Returns the next element in the iteration. | |
| readAll | back to summary |
|---|---|
| public List Reads the entire file into a List with each element being a String[] of tokens.
| |
| readNext | back to summary |
|---|---|
| public String[] readNext() throws IOException Reads the next line from the buffer and converts to a string array.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |