Package ai.djl.inference.streaming
Class IteratorBytesSupplier
java.lang.Object
ai.djl.inference.streaming.IteratorBytesSupplier
- All Implemented Interfaces:
BytesSupplier,Iterator<byte[]>
An
IteratorBytesSupplier is a streaming BytesSupplier suitable for synchronous
usage.-
Constructor Summary
ConstructorsConstructorDescriptionIteratorBytesSupplier(Iterator<BytesSupplier> sources) Constructs anIteratorBytesSupplier. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.djl.ndarray.BytesSupplier
getAsObject, getAsStringMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
IteratorBytesSupplier
Constructs anIteratorBytesSupplier.- Parameters:
sources- the source suppliers
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
public byte[] next() -
toByteBuffer
Returns theByteBufferpresentation of the object.- Specified by:
toByteBufferin interfaceBytesSupplier- Returns:
- the
ByteBufferpresentation of the object
-
getAsBytes
public byte[] getAsBytes()Returns thebyte[]presentation of the object.- Specified by:
getAsBytesin interfaceBytesSupplier- Returns:
- the
byte[]presentation of the object
-