Class IteratorBytesSupplier

java.lang.Object
ai.djl.inference.streaming.IteratorBytesSupplier
All Implemented Interfaces:
BytesSupplier, Iterator<byte[]>

public class IteratorBytesSupplier extends Object implements BytesSupplier, Iterator<byte[]>
An IteratorBytesSupplier is a streaming BytesSupplier suitable for synchronous usage.
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<byte[]>
    • next

      public byte[] next()
      Specified by:
      next in interface Iterator<byte[]>
    • toByteBuffer

      public ByteBuffer toByteBuffer()
      Returns the ByteBuffer presentation of the object.
      Specified by:
      toByteBuffer in interface BytesSupplier
      Returns:
      the ByteBuffer presentation of the object
    • getAsBytes

      public byte[] getAsBytes()
      Returns the byte[] presentation of the object.
      Specified by:
      getAsBytes in interface BytesSupplier
      Returns:
      the byte[] presentation of the object