- java.lang.Object
-
- com.github.akurilov.commons.io.BinInput<T>
-
- All Implemented Interfaces:
Input<T>,java.lang.AutoCloseable,java.util.function.Supplier<T>
- Direct Known Subclasses:
BinFileInput
public class BinInput<T> extends java.lang.Object implements Input<T>
The item input implementation deserializing the data items from the specified stream
-
-
Constructor Summary
Constructors Constructor Description BinInput(java.io.ObjectInputStream itemsSrc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Tget()Get next itemintget(java.util.List<T> dstBuff, int dstCountLimit)Bulk items get.voidreset()Reset this input making this readable from the beginningvoidsetItemsSrc(java.io.ObjectInputStream itemsSrc)longskip(long itemsCount)Skip some items.java.lang.StringtoString()
-
-
-
Field Detail
-
itemsSrc
protected java.io.ObjectInputStream itemsSrc
-
srcBuff
protected T[] srcBuff
-
srcBuffPos
protected int srcBuffPos
-
-
Method Detail
-
setItemsSrc
public void setItemsSrc(java.io.ObjectInputStream itemsSrc)
-
get
public final int get(java.util.List<T> dstBuff, int dstCountLimit)
Description copied from interface:InputBulk items get.
-
reset
public void reset()
Description copied from interface:InputReset this input making this readable from the beginning
-
skip
public long skip(long itemsCount)
Description copied from interface:InputSkip some items.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-