| Constructor and Description |
|---|
DynamicCsvMapper(Type target,
ClassMeta<T> classMeta,
ColumnDefinitionProvider<CsvColumnDefinition,CsvColumnKey> columnDefinitionProvider) |
DynamicCsvMapper(Type target,
ClassMeta<T> classMeta,
FieldMapperErrorHandler<CsvColumnKey> fieldMapperErrorHandler,
MapperBuilderErrorHandler mapperBuilderErrorHandler,
RowHandlerErrorHandler rowHandlerErrorHandler,
String defaultDateFormat,
ColumnDefinitionProvider<CsvColumnDefinition,CsvColumnKey> columnDefinitions,
PropertyNameMatcherFactory propertyNameMatcherFactory,
CellValueReaderFactory cellValueReaderFactory,
boolean failOnAsm,
int asmMapperNbFieldsLimit,
int maxMethodSize) |
| Modifier and Type | Method and Description |
|---|---|
<H extends RowHandler<? super T>> |
forEach(CsvReader csvReader,
H handle)
Will map each row of the content of reader to an object of type T and will pass that object to the handle via the
RowHandler.handler(T t) call back. |
<H extends RowHandler<? super T>> |
forEach(CsvReader csvReader,
H handle,
int limit)
Will map each row of the content of reader, starting at rowStart and ending before rowEnd, to an object of type T and will pass that object to the handle via the
RowHandler.handler(T t) call back. |
<H extends RowHandler<? super T>> |
forEach(Reader reader,
H handle)
Will map each row of the content of reader to an object of type T and will pass that object to the handle via the
RowHandler.handler(T t) call back. |
<H extends RowHandler<? super T>> |
forEach(Reader reader,
H handle,
int skip)
Will map each row of the content of reader, starting at rowStart, to an object of type T and will pass that object to the handle via the
RowHandler.handler(T t) call back. |
<H extends RowHandler<? super T>> |
forEach(Reader reader,
H handle,
int skip,
int limit)
Will map each row of the content of reader, starting at rowStart and ending before rowEnd, to an object of type T and will pass that object to the handle via the
RowHandler.handler(T t) call back. |
protected CsvMapperImpl<T> |
getCsvMapper(ColumnsMapperKey key) |
Iterator<T> |
iterate(CsvReader csvReader)
Deprecated.
|
Iterator<T> |
iterate(Reader reader)
Deprecated.
|
Iterator<T> |
iterate(Reader reader,
int skip)
Deprecated.
|
Iterator<T> |
iterator(CsvReader csvReader)
Will return an iterator on the reader that will return a mapped object for each row.
|
Iterator<T> |
iterator(Reader reader)
Will return an iterator on the reader that will return a mapped object for each row.
|
Iterator<T> |
iterator(Reader reader,
int skip)
Will return an iterator on the reader that will return a mapped object for each row.
|
Stream<T> |
stream(CsvReader csvReader)
Will return a Stream of T
|
Stream<T> |
stream(Reader reader)
Will return a Stream of T
|
Stream<T> |
stream(Reader reader,
int skip)
Will return a Stream of T.
|
String |
toString() |
public DynamicCsvMapper(Type target, ClassMeta<T> classMeta, FieldMapperErrorHandler<CsvColumnKey> fieldMapperErrorHandler, MapperBuilderErrorHandler mapperBuilderErrorHandler, RowHandlerErrorHandler rowHandlerErrorHandler, String defaultDateFormat, ColumnDefinitionProvider<CsvColumnDefinition,CsvColumnKey> columnDefinitions, PropertyNameMatcherFactory propertyNameMatcherFactory, CellValueReaderFactory cellValueReaderFactory, boolean failOnAsm, int asmMapperNbFieldsLimit, int maxMethodSize)
public DynamicCsvMapper(Type target, ClassMeta<T> classMeta, ColumnDefinitionProvider<CsvColumnDefinition,CsvColumnKey> columnDefinitionProvider)
public <H extends RowHandler<? super T>> H forEach(Reader reader, H handle) throws IOException, MappingException
CsvMapperRowHandler.handler(T t) call back.
The method will return the handler passed as an argument so you can easily chain the calls like
List<T> list = mapper.forEach(reader, new ListHandler<T>()).getList();
forEach in interface CsvMapper<T>H - the row handler typereader - the readerhandle - the callback instanceIOException - if an io error occursMappingException - if an mapping error occurspublic <H extends RowHandler<? super T>> H forEach(CsvReader csvReader, H handle) throws IOException
CsvMapperRowHandler.handler(T t) call back.forEach in interface CsvMapper<T>H - the row handler typecsvReader - the readerhandle - the callback instanceIOException - if an io error occurspublic <H extends RowHandler<? super T>> H forEach(Reader reader, H handle, int skip) throws IOException, MappingException
CsvMapperRowHandler.handler(T t) call back.forEach in interface CsvMapper<T>H - the row handler typereader - the readerhandle - the callback instanceskip - the number of row to skipIOException - if an io error occursMappingException - if an mapping error occurspublic <H extends RowHandler<? super T>> H forEach(CsvReader csvReader, H handle, int limit) throws IOException
CsvMapperRowHandler.handler(T t) call back.forEach in interface CsvMapper<T>H - the row handler typecsvReader - the readerhandle - the callback instancelimit - the number of row to processIOException - if an io error occurspublic <H extends RowHandler<? super T>> H forEach(Reader reader, H handle, int skip, int limit) throws IOException, MappingException
CsvMapperRowHandler.handler(T t) call back.forEach in interface CsvMapper<T>H - the row handler typereader - the readerhandle - the callback instanceskip - the number of row to skiplimit - the number of row to processIOException - if an io error occursMappingException - if an mapping error occurs@Deprecated public Iterator<T> iterate(Reader reader) throws IOException
iterate in interface CsvMapper<T>IOException@Deprecated public Iterator<T> iterate(CsvReader csvReader) throws IOException
iterate in interface CsvMapper<T>IOException@Deprecated public Iterator<T> iterate(Reader reader, int skip) throws IOException
iterate in interface CsvMapper<T>IOExceptionpublic Iterator<T> iterator(Reader reader) throws IOException
CsvMapperiterator in interface CsvMapper<T>reader - the readerIOException - if an io error occurspublic Iterator<T> iterator(CsvReader csvReader) throws IOException
CsvMapperiterator in interface CsvMapper<T>csvReader - the readerIOException - if an io error occurspublic Iterator<T> iterator(Reader reader, int skip) throws IOException
CsvMapperiterator in interface CsvMapper<T>reader - the readerskip - the number of row to skipIOException - if an io error occurspublic Stream<T> stream(Reader reader) throws IOException
CsvMapperstream in interface CsvMapper<T>reader - the readerIOException - if an io error occurspublic Stream<T> stream(CsvReader csvReader) throws IOException
CsvMapperstream in interface CsvMapper<T>csvReader - the readerIOException - if an io error occurspublic Stream<T> stream(Reader reader, int skip) throws IOException
CsvMapperstream in interface CsvMapper<T>reader - the readerskip - the number of row to skipIOException - if an io error occursprotected CsvMapperImpl<T> getCsvMapper(ColumnsMapperKey key)
Copyright © 2015. All rights reserved.