Class ByteArraySequence

java.lang.Object
org.refcodes.serial.ByteArraySequence
All Implemented Interfaces:
Iterable<Byte>, org.refcodes.mixin.Bytes, org.refcodes.mixin.Clearable, org.refcodes.mixin.InputStreamAccessor, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.OutputStreamAccessor, Sequence

public class ByteArraySequence extends Object implements Sequence
A ByteArraySequence implements the Sequence interface by using chunks of byte arrays, therewith reducing array copy operations when working with byte fields. A ByteArraySequence is a one dimensional representation of a byte array of byte arrays (a two dimensional byte array). Each byte array inside the byte array (of byte arrays) is called a chunk. Using this technique we easily can create our Sequence instances consisting of many chunks while reducing the copying and concatenating efforts (and buffer allocations), providing for a low memory footprint.