public class CsvItemInput<I extends Item>
extends java.lang.Object
implements com.github.akurilov.commons.io.Input<I>
| Modifier and Type | Field and Description |
|---|---|
protected ItemFactory<I> |
itemFactory |
protected java.io.BufferedReader |
itemsSrc |
| Modifier | Constructor and Description |
|---|---|
protected |
CsvItemInput(java.io.BufferedReader itemsSrc,
ItemFactory<I> itemFactory) |
|
CsvItemInput(java.io.InputStream in,
ItemFactory<I> itemFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
I |
get() |
int |
get(java.util.List<I> buffer,
int limit) |
void |
reset()
Most probably will cause an IOException due to missing mark
|
protected void |
setItemsSrc(java.io.BufferedReader itemsSrc) |
long |
skip(long itemsCount) |
java.lang.String |
toString() |
protected java.io.BufferedReader itemsSrc
protected final ItemFactory<I extends Item> itemFactory
public CsvItemInput(java.io.InputStream in,
ItemFactory<I> itemFactory)
throws java.io.IOException,
java.lang.NoSuchMethodException
in - the input stream to get the data item records fromitemFactory - the concrete item factory used to parse the recordsjava.io.IOExceptionjava.lang.NoSuchMethodExceptionprotected CsvItemInput(java.io.BufferedReader itemsSrc,
ItemFactory<I> itemFactory)
protected final void setItemsSrc(java.io.BufferedReader itemsSrc)
public long skip(long itemsCount)
throws java.io.IOException
public I get() throws java.io.IOException
public int get(java.util.List<I> buffer, int limit) throws java.io.IOException
public void reset()
throws java.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object