Class Chunk
java.lang.Object
com.mulesoftforge.mule.extension.chunking.api.Chunk
Represents a single chunk of binary data from a larger stream.
Immutable - all fields set at construction.
-
Constructor Summary
ConstructorsConstructorDescriptionChunk(byte[] data, int index, long offset, int length, boolean isFirst, boolean isLast) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getData()Raw binary data for this chunk.intgetIndex()0-based chunk index.intNumber of bytes in this chunk.longByte offset in the original source stream.booleanisFirst()True if this is the first chunk (index == 0).booleanisLast()True if this is the last chunk in the stream.toString()
-
Constructor Details
-
Chunk
public Chunk(byte[] data, int index, long offset, int length, boolean isFirst, boolean isLast)
-
-
Method Details
-
getData
public byte[] getData()Raw binary data for this chunk. -
getIndex
public int getIndex()0-based chunk index. -
getOffset
public long getOffset()Byte offset in the original source stream. -
getLength
public int getLength()Number of bytes in this chunk. -
isFirst
public boolean isFirst()True if this is the first chunk (index == 0). -
isLast
public boolean isLast()True if this is the last chunk in the stream. -
toString
-