|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICsvListReader
Supertype for readers reading into lists.
| Method Summary | |
|---|---|
void |
close()
close the stream |
String |
get(int N)
Get column N of the current line This is useful for parsing e.g. first column and react by reading the line on the basis of that first argument |
String[] |
getCSVHeader(boolean firstLineCheck)
This method is used to get an optional header of the csv file and move the file curser to the first row containing data (the second row from the top) The header can subsequently be used as the nameMapper for read
operations. |
int |
getLineNumber()
gets the current position in the file. |
int |
length()
returns the length of the current line |
List<String> |
read()
Plain reading a line into a list of strings. |
List<String> |
read(CellProcessor... processors)
Reading a line into a string array with the possibility to process the entries first (restricted by the fact that the values must fit into a List! |
org.supercsv.io.ICsvReader |
setPreferences(CsvPreference preference)
Determine how the reader reads the input source. |
org.supercsv.io.ICsvReader |
setTokenizer(ITokenizer tokenizer)
Determine how the reader reads the csv file. |
| Method Detail |
|---|
List<String> read()
throws IOException
IOException
List<String> read(CellProcessor... processors)
throws IOException
List!
processors - An array of processors that processes each entry. null entries denotes no processing for
that cell
IOException
void close()
throws IOException
IOException
String get(int N)
throws IOException,
IndexOutOfBoundsException
IOException
IndexOutOfBoundsException
String[] getCSVHeader(boolean firstLineCheck)
throws IOException
nameMapper for read
operations.
firstLineCheck - denotes whether a check should be made to ensure only the first line of the file can represent a header
IOException - if an I/O error occurs or if the method is not called as the first read operation on a source. *int getLineNumber()
int length()
throws IOException
IOExceptionorg.supercsv.io.ICsvReader setPreferences(CsvPreference preference)
org.supercsv.io.ICsvReader setTokenizer(ITokenizer tokenizer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||