Input<T>, java.io.Closeable, java.lang.AutoCloseableBinFileInputpublic class BinInput<T> extends java.lang.Object implements Input<T>
| Modifier and Type | Field | Description |
|---|---|---|
protected java.io.ObjectInputStream |
itemsSrc |
|
protected T[] |
srcBuff |
|
protected int |
srcBuffPos |
| Constructor | Description |
|---|---|
BinInput(java.io.ObjectInputStream itemsSrc) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
T |
get() |
Get next item
|
int |
get(java.util.List<T> dstBuff,
int dstCountLimit) |
Bulk items get.
|
void |
reset() |
Reset this input making this readable from the beginning
|
void |
setItemsSrc(java.io.ObjectInputStream itemsSrc) |
|
long |
skip(long itemsCount) |
Skip some items.
|
java.lang.String |
toString() |
protected java.io.ObjectInputStream itemsSrc
protected T[] srcBuff
protected int srcBuffPos
public void setItemsSrc(java.io.ObjectInputStream itemsSrc)
public final T get() throws java.io.IOException
Inputpublic final int get(java.util.List<T> dstBuff, int dstCountLimit) throws java.io.IOException
Inputget in interface Input<T>dstBuff - buffer for the itemsdstCountLimit - max count of the items to put into the bufferjava.io.EOFException - if no item available morejava.io.IOException - if failed to get some-whypublic void reset()
throws java.io.IOException
Inputpublic long skip(long itemsCount)
throws java.io.IOException
Inputpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object