|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectthinkmap.datasource.flatfile2.CSVReader
public class CSVReader
| Field Summary | |
|---|---|
static char |
DEFAULT_ESCAPE_CHARACTER
The default escape character to use if none is supplied to the constructor. |
static char |
DEFAULT_QUOTE_CHARACTER
The default quote character to use if none is supplied to the constructor. |
static char |
DEFAULT_SEPARATOR
The default separator to use if none is supplied to the constructor. |
static int |
DEFAULT_SKIP_LINES
The default line to start reading. |
static int |
INITIAL_READ_SIZE
|
| Constructor Summary | |
|---|---|
CSVReader(thinkmap.datasource.flatfile2.IFFEntityModel model,
URL url)
Constructs CSVReader using a comma for the separator. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the underlying reader. |
int |
getLineNumber()
Returns the current line number |
long |
getModificationTime()
|
List<String[]> |
readAll()
Reads the entire file into a List with each element being a String[] of tokens. |
String[] |
readNext()
Reads the next line from the buffer and converts to a string array. |
protected String |
stripBOMs(String line)
So Apparently in UTF encodings, there are these hidden characters called Byte Order Marks (BOMS). |
| 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
public static final int INITIAL_READ_SIZE
public static final char DEFAULT_QUOTE_CHARACTER
public static final char DEFAULT_ESCAPE_CHARACTER
public static final int DEFAULT_SKIP_LINES
| Constructor Detail |
|---|
public CSVReader(thinkmap.datasource.flatfile2.IFFEntityModel model,
URL url)
throws IOException
reader - the reader to an underlying CSV source.
IOException| Method Detail |
|---|
public long getModificationTime()
getModificationTime in interface IFlatFileReader
public List<String[]> readAll()
throws IOException
IOException - if bad things happen during the read
public String[] readNext()
throws IOException
readNext in interface IFlatFileReaderIOException - if bad things happen during the readpublic int getLineNumber()
IFlatFileReader
getLineNumber in interface IFlatFileReader
public void close()
throws IOException
close in interface CloseableIOException - if the close failsprotected String stripBOMs(String line)
buffer - line -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||