IndexedByteSequenceStream

class IndexedByteSequenceStream(val buffer: ByteBuffer, val step: Int = 0) : ByteSequenceStream

Constructors

Link copied to clipboard
fun IndexedByteSequenceStream(buffer: ByteBuffer, step: Int = 0)

Functions

Link copied to clipboard
open override fun close()

Closes the stream and prevents it from being read again.

Link copied to clipboard
open override fun hasRemaining(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Byte>
Link copied to clipboard
open override fun readByte(): Int

Reads the next Byte and returns as an Int.

Link copied to clipboard
open override fun readChunk(size: Int): ByteArray

Reads the next chunk of the specified size or until it reaches the end of the ByteSequenceStream.

Link copied to clipboard
open override fun readFloat(): Float

Reads the next Float.

Link copied to clipboard
open override fun readInt(): Int

Reads the next Int

Link copied to clipboard
open override fun readShort(): Int

Reads the next Short and returns as an Int.

Link copied to clipboard
open override fun readUByte(): Int

Reads the next Byte as an unsigned byte and returns as an Int.

Link copied to clipboard
open override fun readUInt(): Int

Reads the next Int as an unsigned int and returns as an Int.

Link copied to clipboard
open override fun readUShort(): Int

Reads the next Short as an unsigned short and returns as an Int.

Link copied to clipboard
open override fun reset()

Resets the chunk iterator back to the beginning.

Link copied to clipboard
open override fun skip(amount: Int)

Skip the next specified amount of bytes to read

Properties

Link copied to clipboard
Link copied to clipboard
var index: Int = 0
Link copied to clipboard
val step: Int = 0