Module com.github.akurilov.commons
Class BufferingInputBase<T>
- java.lang.Object
-
- com.github.akurilov.commons.io.collection.ListInput<T>
-
- com.github.akurilov.commons.io.collection.BufferingInputBase<T>
-
-
Constructor Summary
Constructors Constructor Description BufferingInputBase(int capacity)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Does nothingTget()Get next itemintget(java.util.List<T> buffer, int maxCount)Bulk get into the specified bufferprotected abstract intloadMoreItems(T lastItem)Called when the elements buffer is exhausted.
-
-
-
Method Detail
-
loadMoreItems
protected abstract int loadMoreItems(T lastItem) throws java.io.IOException
Called when the elements buffer is exhausted. Should put more (but not more than "capacity") new elements into the empty buffer.- Returns:
- the count of the items was actually loaded into the "items" buffer or 0 if no more items are available.
- Throws:
java.io.IOException
-
get
public final T get() throws java.io.IOException
Description copied from interface:InputGet next item
-
get
public final int get(java.util.List<T> buffer, int maxCount) throws java.io.IOException
Description copied from class:ListInputBulk get into the specified buffer
-
-