public class CsvParser<T> extends Object implements Parser<T>
| Constructor and Description |
|---|
CsvParser(Class<T> clazz,
File file,
Charset charset) |
CsvParser(Class<T> clazz,
File file,
Charset charset,
Class<?> group) |
CsvParser(Class<T> clazz,
File file,
Charset charset,
int afterLine,
Class<?> group) |
CsvParser(Class<T> clazz,
InputStream inputStream,
Charset charset) |
CsvParser(Class<T> clazz,
InputStream inputStream,
Charset charset,
Class<?> group) |
CsvParser(Class<T> clazz,
InputStream input,
Charset charset,
int afterLine,
Class<?> group) |
CsvParser(Class<T> clazz,
List<String> csvLines) |
CsvParser(Class<T> clazz,
List<String> csvLines,
Class<?> group) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ExporterFormatter |
getExporterFormatter() |
FileType |
getFileType() |
List<List<String>> |
getLines() |
int |
getNumberOfSheets() |
int |
getSheetNumber() |
boolean |
isIgnoreBlankLinesAtEnd() |
List<T> |
parse()
Parser file to list of T objects
Obs.: No read de first line.
|
void |
setExporterFormatter(ExporterFormatter exporterFormatter) |
void |
setFirstVisibleSheet() |
void |
setGroup(Class<?> group) |
void |
setHeadersRows(int headersRows) |
void |
setIgnoreBlankLinesAtEnd(boolean ignoreBlankLinesAtEnd) |
void |
setLastsheet(boolean lastsheet) |
void |
setSheetNumber(int sheetNumber) |
void |
setSheetNumberAsFirstNotHidden() |
public CsvParser(Class<T> clazz, File file, Charset charset, int afterLine, Class<?> group) throws IOException
IOExceptionpublic CsvParser(Class<T> clazz, InputStream input, Charset charset, int afterLine, Class<?> group) throws IOException
IOExceptionpublic CsvParser(Class<T> clazz, File file, Charset charset) throws IOException
IOExceptionpublic CsvParser(Class<T> clazz, File file, Charset charset, Class<?> group) throws IOException
IOExceptionpublic CsvParser(Class<T> clazz, InputStream inputStream, Charset charset) throws IOException
IOExceptionpublic CsvParser(Class<T> clazz, InputStream inputStream, Charset charset, Class<?> group) throws IOException
IOExceptionpublic int getNumberOfSheets()
getNumberOfSheets in interface Parser<T>public void setSheetNumber(int sheetNumber)
setSheetNumber in interface Parser<T>public void setLastsheet(boolean lastsheet)
setLastsheet in interface Parser<T>public void setFirstVisibleSheet()
setFirstVisibleSheet in interface Parser<T>public int getSheetNumber()
getSheetNumber in interface Parser<T>public void setSheetNumberAsFirstNotHidden()
setSheetNumberAsFirstNotHidden in interface Parser<T>public FileType getFileType()
getFileType in interface Parser<T>public void setExporterFormatter(ExporterFormatter exporterFormatter)
setExporterFormatter in interface Parser<T>public ExporterFormatter getExporterFormatter()
getExporterFormatter in interface Parser<T>public void setHeadersRows(int headersRows)
setHeadersRows in interface Parser<T>public boolean isIgnoreBlankLinesAtEnd()
isIgnoreBlankLinesAtEnd in interface Parser<T>public void setIgnoreBlankLinesAtEnd(boolean ignoreBlankLinesAtEnd)
setIgnoreBlankLinesAtEnd in interface Parser<T>public List<List<String>> getLines() throws SAXException, org.apache.poi.openxml4j.exceptions.OpenXML4JException, ParserConfigurationException, IOException
getLines in interface Parser<T>SAXExceptionorg.apache.poi.openxml4j.exceptions.OpenXML4JExceptionParserConfigurationExceptionIOExceptionpublic List<T> parse() throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
parse in interface Parser<T>IllegalAccessException - IllegalAccessExceptionInstantiationException - InstantiationExceptionInvocationTargetException - InvocationTargetExceptionNoSuchMethodException - NoSuchMethodExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017 TecSinapse. All rights reserved.