|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.persistence.impl.CsvFileReaderImpl
public class CsvFileReaderImpl
Represent a csv file reader and writer.
Field Summary | |
---|---|
static char |
DEFAULT_COL_DELIMETER
The default column delimeter. |
static char |
DEFAULT_TEXT_QUALIFIER
The default text qualifier. |
Constructor Summary | |
---|---|
CsvFileReaderImpl()
|
Method Summary | |
---|---|
void |
close()
Close the csv file. |
java.util.List |
getTopLines(int lines)
Read the top lines with the give number. |
void |
open(java.lang.String csvFileName)
Open a csv file. |
void |
open(java.lang.String csvFileName,
char colDelimeter,
char textQualifier)
Open a csv file with the given column delimeter and text qualifier. |
java.lang.String[] |
readNext()
Read the next line. |
void |
setElasticPath(ElasticPath elasticPath)
Sets the context instance ElasticPath . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char DEFAULT_COL_DELIMETER
public static final char DEFAULT_TEXT_QUALIFIER
Constructor Detail |
---|
public CsvFileReaderImpl()
Method Detail |
---|
public void close() throws EpPersistenceException
close
in interface CsvFileReader
EpPersistenceException
- in case of any IO error happenspublic java.util.List getTopLines(int lines) throws EpPersistenceException
getTopLines
in interface CsvFileReader
lines
- the number of lines to read
EpPersistenceException
- in case of any IO errorpublic void open(java.lang.String csvFileName) throws EpPersistenceException
open
in interface CsvFileReader
csvFileName
- the csv file name
EpPersistenceException
- if the given file doesn't existpublic void open(java.lang.String csvFileName, char colDelimeter, char textQualifier) throws EpPersistenceException
open
in interface CsvFileReader
csvFileName
- the csv file namecolDelimeter
- the column delimetertextQualifier
- the text qualifer
EpPersistenceException
- if the given file doesn't existpublic java.lang.String[] readNext() throws EpPersistenceException
readNext
in interface CsvFileReader
null
at the end of file
EpPersistenceException
- in case of any IO error happenspublic void setElasticPath(ElasticPath elasticPath)
ElasticPath
.
elasticPath
- the context instance ElasticPath
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |