|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
com.taleo.integration.client.customstep.util.csv.CSVReader
public class CSVReader
Character delimited (CSV file) reader.
Field Summary | |
---|---|
static java.lang.String |
ERROR_INVALID_READER
Error message format when the csv is not well form. |
static java.lang.String |
STANDARD_ESCAPING_MODE
Define a default quote character for the csv column (excel). |
static java.lang.String |
TALEO_ESCAPING_MODE
Define a default quote character for the csv column (ISS). |
static java.lang.String |
UNEXPECTED_LINE_FORMAT
Error message format when the csv is not well form. |
static java.lang.String |
UNSUPPORTED_TALEO_FORMAT_FOR_STRING_RESULT
Error message format when the csv is not well form. |
Fields inherited from class java.io.Reader |
---|
lock |
Constructor Summary | |
---|---|
CSVReader(java.io.Reader pReader)
Default constructor. |
|
CSVReader(java.io.Reader pReader,
boolean pHasHeader)
Main constructor. |
|
CSVReader(java.io.Reader pReader,
boolean pHasHeader,
char pDelimiter,
char pQuoteDelimiter)
Main constructor. |
|
CSVReader(java.io.Reader pReader,
boolean pHasHeader,
char pDelimiter,
char pQuoteDelimiter,
java.lang.String pLineFeed)
Main constructor. |
|
CSVReader(java.io.Reader pReader,
boolean pHasHeader,
char pDelimiter,
char pQuoteDelimiter,
java.lang.String pEscapingDelimiter,
java.lang.String pEscapingCarriageReturn,
java.lang.String pEscapingLineFeed)
Main constructor. |
Method Summary | |
---|---|
boolean |
bufferIsEmpty()
Return true if the pre-read buffer is empty. |
void |
close()
|
java.util.List |
getHeadingNames()
Get the list of headers. |
java.util.Properties |
getProperties()
Returns the properties. |
int |
read()
|
int |
read(char[] pCbuf,
int pOff,
int pLen)
|
boolean |
readLine(java.util.List pLine)
Read a single line. |
boolean |
readLine(java.util.List pLine,
char pDelimiter,
char pQuoteCaracter,
java.lang.String pLineFeed)
Read a single line. |
boolean |
readLine(java.util.Map pLine)
Read a line of the csv file and populate the values in the list argument. |
boolean |
readLineTaleo(java.util.List pLine,
char pDelimiter,
char pQuoteCaracter)
Read a single line. |
Methods inherited from class java.io.Reader |
---|
mark, markSupported, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TALEO_ESCAPING_MODE
public static final java.lang.String STANDARD_ESCAPING_MODE
public static final java.lang.String UNEXPECTED_LINE_FORMAT
public static final java.lang.String UNSUPPORTED_TALEO_FORMAT_FOR_STRING_RESULT
public static final java.lang.String ERROR_INVALID_READER
Constructor Detail |
---|
public CSVReader(java.io.Reader pReader)
pReader
- The readerpublic CSVReader(java.io.Reader pReader, boolean pHasHeader)
pReader
- The readerpHasHeader
- Flag indicating if a header line is presentpublic CSVReader(java.io.Reader pReader, boolean pHasHeader, char pDelimiter, char pQuoteDelimiter)
pReader
- The readerpHasHeader
- Flag indicating if a header line is presentpDelimiter
- The value delimiterpQuoteDelimiter
- The quoting characterpublic CSVReader(java.io.Reader pReader, boolean pHasHeader, char pDelimiter, char pQuoteDelimiter, java.lang.String pLineFeed)
pReader
- The readerpHasHeader
- Flag indicating if a header line is presentpDelimiter
- The value delimiterpQuoteDelimiter
- The quoting characterpLineFeed
- The line feed characterpublic CSVReader(java.io.Reader pReader, boolean pHasHeader, char pDelimiter, char pQuoteDelimiter, java.lang.String pEscapingDelimiter, java.lang.String pEscapingCarriageReturn, java.lang.String pEscapingLineFeed)
pReader
- The readerpHasHeader
- Flag indicating if a header line is presentpDelimiter
- The value delimiterpQuoteDelimiter
- The quoting characterpEscapingDelimiter
- The escaping sequence for the delimiterpEscapingCarriageReturn
- The escaping sequence for the carriage returnpEscapingLineFeed
- The escaping sequence for the line feedMethod Detail |
---|
public boolean bufferIsEmpty()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
public int read(char[] pCbuf, int pOff, int pLen) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
public boolean readLine(java.util.Map pLine) throws java.io.IOException, InvalidCSVFileFormat
pLine
- The map of lines
java.io.IOException
InvalidCSVFileFormat
public boolean readLine(java.util.List pLine) throws java.io.IOException, InvalidCSVFileFormat
pLine
- The list of lines
java.io.IOException
InvalidCSVFileFormat
public boolean readLine(java.util.List pLine, char pDelimiter, char pQuoteCaracter, java.lang.String pLineFeed) throws java.io.IOException, InvalidCSVFileFormat
pLine
- The list of linespDelimiter
- The delimiterpQuoteCaracter
- The quoting characterpLineFeed
- The line feed character
InvalidCSVFileFormat
java.io.IOException
- - If an I/O error occurspublic boolean readLineTaleo(java.util.List pLine, char pDelimiter, char pQuoteCaracter) throws java.io.IOException, InvalidCSVFileFormat
pLine
- The list of linespDelimiter
- The delimiterpQuoteCaracter
- The quoting character
InvalidCSVFileFormat
java.io.IOException
- - If an I/O error occurspublic java.util.Properties getProperties()
public java.util.List getHeadingNames() throws java.io.IOException, InvalidCSVFileFormat
java.io.IOException
InvalidCSVFileFormat
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |