|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.databene.document.csv.CSVLineIterator
public class CSVLineIterator
Gives accesses to content of a CSV file by String arrays
that represent the CSV rows as specified in RFC 4180.
| Field Summary | |
|---|---|
static char |
DEFAULT_SEPARATOR
The default separator to use |
| Constructor Summary | |
|---|---|
CSVLineIterator(java.io.Reader reader)
Creates a parser that reads from a reader |
|
CSVLineIterator(java.io.Reader reader,
char separator)
Creates a parser that reads from a reader and used a special separator character |
|
CSVLineIterator(java.io.Reader reader,
char separator,
boolean ignoreEmptyLines)
|
|
CSVLineIterator(java.lang.String uri)
Creates a parser that reads from a uri |
|
CSVLineIterator(java.lang.String uri,
char separator)
Creates a parser that reads from a uri |
|
CSVLineIterator(java.lang.String uri,
char separator,
boolean ignoreEmptyLines)
|
|
CSVLineIterator(java.lang.String uri,
char separator,
boolean ignoreEmptyLines,
java.lang.String encoding)
|
|
CSVLineIterator(java.lang.String uri,
char separator,
java.lang.String encoding)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the source |
boolean |
hasNext()
|
int |
lineCount()
|
java.lang.String[] |
next()
Parses a CSV row into an array of Strings |
static void |
process(java.lang.String uri,
char separator,
java.lang.String encoding,
boolean ignoreEmptyLines,
CSVLineHandler lineHandler)
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char DEFAULT_SEPARATOR
| Constructor Detail |
|---|
public CSVLineIterator(java.lang.String uri)
throws java.io.IOException
uri - the URL to read from
java.io.IOException - if uri access failed
public CSVLineIterator(java.lang.String uri,
char separator)
throws java.io.IOException
uri - the URL to read fromseparator -
java.io.IOException
public CSVLineIterator(java.lang.String uri,
char separator,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException
public CSVLineIterator(java.lang.String uri,
char separator,
boolean ignoreEmptyLines)
throws java.io.IOException
java.io.IOException
public CSVLineIterator(java.lang.String uri,
char separator,
boolean ignoreEmptyLines,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException
public CSVLineIterator(java.io.Reader reader)
throws java.io.IOException
reader - the reader to read from
java.io.IOException
public CSVLineIterator(java.io.Reader reader,
char separator)
throws java.io.IOException
reader - the reader to useseparator - the separator character
java.io.IOException
public CSVLineIterator(java.io.Reader reader,
char separator,
boolean ignoreEmptyLines)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.String[]>public java.lang.String[] next()
next in interface java.util.Iterator<java.lang.String[]>public void remove()
remove in interface java.util.Iterator<java.lang.String[]>public void close()
close in interface java.io.Closeablepublic int lineCount()
public static void process(java.lang.String uri,
char separator,
java.lang.String encoding,
boolean ignoreEmptyLines,
CSVLineHandler lineHandler)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||