fm.liveswitch.DataBufferSubset Class Reference

A subset of a DataBuffer. More...

Public Member Functions

fm.liveswitch.DataBuffer append (fm.liveswitch.DataBuffer buffer)
 Appends a buffer. More...
 
fm.liveswitch.DataBuffer append (fm.liveswitch.DataBuffer[] buffers)
 Appends some buffers. More...
 
fm.liveswitch.DataBuffer free ()
 Decrements the retain count by one and returns the Buffer to the pool if zero. More...
 
byte[] getData ()
 Gets the data. More...
 
boolean getIsPooled ()
 Gets whether this DataBuffer is from a pool. More...
 
boolean getIsSubset ()
 Gets whether this DataBuffer is a subset. More...
 
fm.liveswitch.DataBuffer getParent ()
 Gets the Subset parent. More...
 
fm.liveswitch.DataBuffer keep ()
 Increment the retain count by one. More...
 
fm.liveswitch.DataBuffer prepend (fm.liveswitch.DataBuffer buffer)
 Prepends a buffer. More...
 
void prepend (fm.liveswitch.DataBuffer[] buffers)
 Prepends some buffers. More...
 
fm.liveswitch.DataBuffer subset (int offset)
 Gets a subset of this instance. More...
 
fm.liveswitch.DataBuffer subset (int offset, int length)
 Gets a subset of this instance. More...
 
- Public Member Functions inherited from fm.liveswitch.DataBuffer
boolean and (int value, int offset)
 Performs a bitwise "and" operation on a value. More...
 
boolean canResize (int newLength, int offset)
 Gets whether this buffer can be resized to the new length. More...
 
fm.liveswitch.DataBuffer clone ()
 Clones this instance. More...
 
fm.liveswitch.DataBuffer clone (boolean littleEndian)
 Clones this instance. More...
 
fm.liveswitch.DataBuffer copy ()
 Copies this instance into new memory. More...
 
fm.liveswitch.DataBuffer copy (boolean usePool)
 Copies this instance. More...
 
int getIndex ()
 Gets the index. More...
 
int getLength ()
 Gets the length. More...
 
boolean getLittleEndian ()
 Gets whether fm.liveswitch.DataBuffer#getData is little-endian. More...
 
boolean or (int value, int offset)
 Performs a bitwise "or" operation on a value. More...
 
boolean read1 (int offset, int bitOffset)
 Reads a 1-bit value. More...
 
int read10 (int offset, int bitOffset)
 Reads a 10-bit value. More...
 
int read10Signed (int offset, int bitOffset)
 Reads a 10-bit signed value. More...
 
int read11 (int offset, int bitOffset)
 Reads a 11-bit value. More...
 
int read11Signed (int offset, int bitOffset)
 Reads a 11-bit signed value. More...
 
int read12 (int offset, int bitOffset)
 Reads a 12-bit value. More...
 
int read12Signed (int offset, int bitOffset)
 Reads a 12-bit signed value. More...
 
int read13 (int offset, int bitOffset)
 Reads a 13-bit value. More...
 
int read13Signed (int offset, int bitOffset)
 Reads a 13-bit signed value. More...
 
int read14 (int offset, int bitOffset)
 Reads a 14-bit value. More...
 
int read14Signed (int offset, int bitOffset)
 Reads a 14-bit signed value. More...
 
int read15 (int offset, int bitOffset)
 Reads a 15-bit value. More...
 
int read15Signed (int offset, int bitOffset)
 Reads a 15-bit signed value. More...
 
int read16 (int offset)
 Reads a 16-bit value. More...
 
int read16 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 16-bit value. More...
 
int read16Signed (int offset)
 Reads a 16-bit signed value. More...
 
int read16Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 16-bit signed value. More...
 
int read17 (int offset, int bitOffset)
 Reads a 17-bit value. More...
 
int read17Signed (int offset, int bitOffset)
 Reads a 17-bit signed value. More...
 
int read18 (int offset, int bitOffset)
 Reads an 18-bit value. More...
 
int read18Signed (int offset, int bitOffset)
 Reads an 18-bit signed value. More...
 
int read19 (int offset, int bitOffset)
 Reads a 19-bit value. More...
 
int read19Signed (int offset, int bitOffset)
 Reads a 19-bit signed value. More...
 
int read2 (int offset, int bitOffset)
 Reads a 2-bit value. More...
 
int read20 (int offset, int bitOffset)
 Reads a 20-bit value. More...
 
int read20Signed (int offset, int bitOffset)
 Reads a 20-bit signed value. More...
 
int read21 (int offset, int bitOffset)
 Reads a 21-bit value. More...
 
int read21Signed (int offset, int bitOffset)
 Reads a 21-bit signed value. More...
 
int read22 (int offset, int bitOffset)
 Reads a 22-bit value. More...
 
int read22Signed (int offset, int bitOffset)
 Reads a 22-bit signed value. More...
 
int read23 (int offset, int bitOffset)
 Reads a 23-bit value. More...
 
int read23Signed (int offset, int bitOffset)
 Reads a 23-bit signed value. More...
 
int read24 (int offset)
 Reads a 24-bit value. More...
 
int read24 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 24-bit value. More...
 
int read24Signed (int offset)
 Reads a 24-bit signed value. More...
 
int read24Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 24-bit signed value. More...
 
int read2Signed (int offset, int bitOffset)
 Reads a 2-bit signed value. More...
 
int read3 (int offset, int bitOffset)
 Reads a 3-bit value. More...
 
long read32 (int offset)
 Reads a 32-bit value. More...
 
long read32 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 32-bit value. More...
 
long read32Signed (int offset)
 Reads a 32-bit signed value. More...
 
long read32Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 32-bit signed value. More...
 
int read3Signed (int offset, int bitOffset)
 Reads a 3-bit signed value. More...
 
int read4 (int offset, int bitOffset)
 Reads a 4-bit value. More...
 
long read40 (int offset)
 Reads a 40-bit value. More...
 
long read40 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 40-bit value. More...
 
long read40Signed (int offset)
 Reads a 40-bit signed value. More...
 
long read40Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 40-bit signed value. More...
 
long read48 (int offset)
 Reads a 48-bit value. More...
 
long read48 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 48-bit value. More...
 
long read48Signed (int offset)
 Reads a 48-bit signed value. More...
 
long read48Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 48-bit signed value. More...
 
int read4Signed (int offset, int bitOffset)
 Reads a 4-bit signed value. More...
 
int read5 (int offset, int bitOffset)
 Reads a 5-bit value. More...
 
long read56 (int offset)
 Reads a 56-bit value. More...
 
long read56 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 56-bit value. More...
 
long read56Signed (int offset)
 Reads a 56-bit signed value. More...
 
long read56Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 56-bit signed value. More...
 
int read5Signed (int offset, int bitOffset)
 Reads a 5-bit signed value. More...
 
int read6 (int offset, int bitOffset)
 Reads a 6-bit value. More...
 
long read64 (int offset)
 Reads a 64-bit value. More...
 
long read64 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 64-bit value. More...
 
long read64Signed (int offset)
 Reads a 64-bit signed value. More...
 
long read64Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads a 64-bit signed value. More...
 
int read6Signed (int offset, int bitOffset)
 Reads a 6-bit signed value. More...
 
int read7 (int offset, int bitOffset)
 Reads a 7-bit value. More...
 
int read7Signed (int offset, int bitOffset)
 Reads a 7-bit signed value. More...
 
int read8 (int offset)
 Reads an 8-bit value. More...
 
int read8 (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads an 8-bit value. More...
 
int read8Signed (int offset)
 Reads an 8-bit signed value. More...
 
int read8Signed (int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Reads an 8-bit signed value. More...
 
int read9 (int offset, int bitOffset)
 Reads a 9-bit value. More...
 
int read9Signed (int offset, int bitOffset)
 Reads a 9-bit signed value. More...
 
String readUtf8String (int offset)
 Read a UTF-8 string. More...
 
String readUtf8String (int offset, int length)
 Reads a UTF-8 string. More...
 
void resize (int newLength)
 Resizes this buffer to a new length with new data being inserted at the end. More...
 
void resize (int newLength, int offset)
 Resizes this buffer to a new length with new data being inserted at a given offset. More...
 
void resize (int newLength, int offset, boolean setZero)
 Resizes this buffer to a new length with new data being inserted at a given offset. More...
 
boolean sequenceEquals (fm.liveswitch.DataBuffer buffer)
 Compares a data buffer for equality. More...
 
boolean sequenceEqualsConstantTime (fm.liveswitch.DataBuffer buffer)
 Compares a data buffer for equality in constant time. More...
 
void set (byte value)
 Sets the data buffer to the specified value. More...
 
void set (byte value, int offset)
 Sets a subset of the data buffer to the specified value. More...
 
void set (byte value, int offset, int length)
 Sets a subset of the data buffer to the specified value. More...
 
void setLittleEndian (boolean value)
 Sets whether fm.liveswitch.DataBuffer#getData is little-endian. More...
 
byte[] toArray ()
 Converts this instance to an array of bytes. More...
 
byte[] toBytes ()
 Converts this instance to an array of bytes. More...
 
String toHexString ()
 Converts this instance to a hexadecimal string. More...
 
String toJson ()
 Serializes this instance to JSON. More...
 
boolean tryKeep ()
 Attempts to increment the retain count by one. More...
 
boolean tryRead1 (int offset, int bitOffset, fm.liveswitch.BooleanHolder value)
 Tries to read a 1-bit value. More...
 
boolean tryRead10 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 10-bit value. More...
 
boolean tryRead11 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read an 11-bit value. More...
 
boolean tryRead12 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 12-bit value. More...
 
boolean tryRead13 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 13-bit value. More...
 
boolean tryRead14 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 14-bit value. More...
 
boolean tryRead15 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 15-bit value. More...
 
boolean tryRead16 (int offset, fm.liveswitch.IntegerHolder value)
 Tries to read a 16-bit value. More...
 
boolean tryRead17 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 17-bit value. More...
 
boolean tryRead18 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read an 18-bit value. More...
 
boolean tryRead19 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 19-bit value. More...
 
boolean tryRead2 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 2-bit value. More...
 
boolean tryRead20 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 20-bit value. More...
 
boolean tryRead21 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 21-bit value. More...
 
boolean tryRead22 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 22-bit value. More...
 
boolean tryRead23 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 23-bit value. More...
 
boolean tryRead24 (int offset, fm.liveswitch.IntegerHolder value)
 Tries to read a 24-bit value. More...
 
boolean tryRead3 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 3-bit value. More...
 
boolean tryRead32 (int offset, fm.liveswitch.LongHolder value)
 Tries to read a 32-bit value. More...
 
boolean tryRead4 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 4-bit value. More...
 
boolean tryRead40 (int offset, fm.liveswitch.LongHolder value)
 Tries to read a 40-bit value. More...
 
boolean tryRead48 (int offset, fm.liveswitch.LongHolder value)
 Tries to read a 48-bit value. More...
 
boolean tryRead5 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 5-bit value. More...
 
boolean tryRead56 (int offset, fm.liveswitch.LongHolder value)
 Tries to read a 56-bit value. More...
 
boolean tryRead6 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 6-bit value. More...
 
boolean tryRead64 (int offset, fm.liveswitch.LongHolder value)
 Tries to read a 64-bit value. More...
 
boolean tryRead7 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 7-bit value. More...
 
boolean tryRead8 (int offset, fm.liveswitch.IntegerHolder value)
 Tries to read an 8-bit value. More...
 
boolean tryRead9 (int offset, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 9-bit value. More...
 
void write (fm.liveswitch.DataBuffer buffer)
 Writes a data buffer to this instance. More...
 
void write (fm.liveswitch.DataBuffer buffer, int offset)
 Writes a data buffer to this instance. More...
 
void write (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a data buffer to this instance. More...
 
boolean write1 (boolean value, int offset, int bitOffset)
 Writes a 1-bit value. More...
 
boolean write10 (int value, int offset, int bitOffset)
 Writes a 10-bit value. More...
 
boolean write11 (int value, int offset, int bitOffset)
 Writes an 11-bit value. More...
 
boolean write12 (int value, int offset, int bitOffset)
 Writes a 12-bit value. More...
 
boolean write13 (int value, int offset, int bitOffset)
 Writes a 13-bit value. More...
 
boolean write14 (int value, int offset, int bitOffset)
 Writes a 14-bit value. More...
 
boolean write15 (int value, int offset, int bitOffset)
 Writes a 15-bit value. More...
 
boolean write16 (int value, int offset)
 Writes a 16-bit value. More...
 
boolean write16 (int value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 16-bit value. More...
 
boolean write17 (int value, int offset, int bitOffset)
 Writes a 17-bit value. More...
 
boolean write18 (int value, int offset, int bitOffset)
 Writes an 18-bit value. More...
 
boolean write19 (int value, int offset, int bitOffset)
 Writes a 19-bit value. More...
 
boolean write2 (int value, int offset, int bitOffset)
 Writes a 2-bit value. More...
 
boolean write20 (int value, int offset, int bitOffset)
 Writes a 20-bit value. More...
 
boolean write21 (int value, int offset, int bitOffset)
 Writes a 21-bit value. More...
 
boolean write22 (int value, int offset, int bitOffset)
 Writes a 22-bit value. More...
 
boolean write23 (int value, int offset, int bitOffset)
 Writes a 23-bit value. More...
 
boolean write24 (int value, int offset)
 Writes a 24-bit value. More...
 
boolean write24 (int value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 24-bit value. More...
 
boolean write3 (int value, int offset, int bitOffset)
 Writes a 3-bit value. More...
 
boolean write32 (long value, int offset)
 Writes a 32-bit value. More...
 
boolean write32 (long value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 32-bit value. More...
 
boolean write4 (int value, int offset, int bitOffset)
 Writes a 4-bit value. More...
 
boolean write40 (long value, int offset)
 Writes a 40-bit value. More...
 
boolean write40 (long value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 40-bit value. More...
 
boolean write48 (long value, int offset)
 Writes a 48-bit value. More...
 
boolean write48 (long value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 48-bit value. More...
 
boolean write5 (int value, int offset, int bitOffset)
 Writes a 5-bit value. More...
 
boolean write56 (long value, int offset)
 Writes a 56-bit value. More...
 
boolean write56 (long value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 56-bit value. More...
 
boolean write6 (int value, int offset, int bitOffset)
 Writes a 6-bit value. More...
 
boolean write64 (long value, int offset)
 Writes a 64-bit value. More...
 
boolean write64 (long value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a 64-bit value. More...
 
boolean write7 (int value, int offset, int bitOffset)
 Writes a 7-bit value. More...
 
boolean write8 (int value, int offset)
 Writes an 8-bit value. More...
 
boolean write8 (int value, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes an 8-bit value. More...
 
boolean write9 (int value, int offset, int bitOffset)
 Writes a 9-bit value. More...
 
void writeBytes (byte[] bytes)
 Writes a byte array to this instance. More...
 
void writeBytes (byte[] bytes, int bytesIndex, int bytesLength, int offset)
 Writes a byte array to this instance. More...
 
void writeBytes (byte[] bytes, int bytesIndex, int bytesLength, int offset, fm.liveswitch.IntegerHolder offsetPlus)
 Writes a byte array to this instance. More...
 
void writeBytes (byte[] bytes, int bytesIndex, int offset)
 Writes a byte array to this instance. More...
 
void writeBytes (byte[] bytes, int offset)
 Writes a byte array to this instance. More...
 
boolean xor (int value, int offset)
 Performs a bitwise "xor" operation on a value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from fm.liveswitch.DataBuffer
static fm.liveswitch.DataBuffer allocate (int count)
 Allocates a new data buffer with a given size (in bytes) in big-endian format. More...
 
static fm.liveswitch.DataBuffer allocate (int count, boolean littleEndian)
 Allocates a new data buffer with a given size (in bytes). More...
 
static boolean areEqual (fm.liveswitch.DataBuffer buffer1, fm.liveswitch.DataBuffer buffer2)
 Tests if the two buffers have equal contents. More...
 
static fm.liveswitch.DataBuffer fromBytes (byte[] bytes)
 Creates an instance from an array of bytes. More...
 
static fm.liveswitch.DataBuffer fromBytes (byte[] bytes, boolean littleEndian)
 Creates an instance from an array of bytes. More...
 
static fm.liveswitch.DataBuffer fromHexString (String hexString)
 Creates an instance from a hexadecimal string. More...
 
static fm.liveswitch.DataBuffer fromHexString (String hexString, boolean littleEndian)
 Creates an instance from a hexadecimal string. More...
 
static fm.liveswitch.DataBuffer fromJson (String dataBufferJson)
 Deserializes an instance from JSON. More...
 
static fm.liveswitch.DataBuffer[] fromJsonArray (String dataBuffersJson)
 Deserializes an array of instances from JSON. More...
 
static fm.liveswitch.DataBuffer getEmpty ()
 Gets an empty data buffer. More...
 
static String toJson (final fm.liveswitch.DataBuffer dataBuffer)
 Serializes an instance to JSON. More...
 
static String toJsonArray (fm.liveswitch.DataBuffer[] dataBuffers)
 Serializes an array of instances to JSON. More...
 
static fm.liveswitch.DataBuffer wrap (byte[] data)
 Produces a new data buffer containing supplied data in big-endian format. More...
 
static fm.liveswitch.DataBuffer wrap (byte[] data, int index)
 Produces a new data buffer containing supplied data in big-endian format. More...
 
static fm.liveswitch.DataBuffer wrap (byte[] data, int index, int length)
 Produces a new data buffer containing supplied data in big-endian format. More...
 
static fm.liveswitch.DataBuffer wrap (byte[] data, int index, int length, boolean littleEndian)
 Produces a new data buffer containing supplied data. More...
 
static fm.liveswitch.DataBuffer wrap (byte[] data, int index, boolean littleEndian)
 Produces a new data buffer containing supplied data. More...
 
static fm.liveswitch.DataBuffer wrap (byte[] data, boolean littleEndian)
 Produces a new data buffer containing supplied data. More...
 
- Protected Member Functions inherited from fm.liveswitch.DataBuffer
byte[] getInnerData ()
 Gets backing data buffer. More...
 
void setIndex (int value)
 Sets the index. More...
 
void setInnerData (byte[] value)
 Sets backing data buffer. More...
 
void setLength (int value)
 Sets the length. More...
 

Detailed Description

A subset of a DataBuffer.

Member Function Documentation

◆ append() [1/2]

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.append ( fm.liveswitch.DataBuffer  buffer)

Appends a buffer.

Parameters
bufferThe buffer.

Reimplemented from fm.liveswitch.DataBuffer.

◆ append() [2/2]

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.append ( fm.liveswitch.DataBuffer[]  buffers)

Appends some buffers.

Parameters
buffersThe buffers.

Reimplemented from fm.liveswitch.DataBuffer.

◆ free()

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.free ( )

Decrements the retain count by one and returns the Buffer to the pool if zero.

Reimplemented from fm.liveswitch.DataBuffer.

◆ getData()

byte [] fm.liveswitch.DataBufferSubset.getData ( )

Gets the data.

Reimplemented from fm.liveswitch.DataBuffer.

◆ getIsPooled()

boolean fm.liveswitch.DataBufferSubset.getIsPooled ( )

Gets whether this DataBuffer is from a pool.

Reimplemented from fm.liveswitch.DataBuffer.

◆ getIsSubset()

boolean fm.liveswitch.DataBufferSubset.getIsSubset ( )

Gets whether this DataBuffer is a subset.

Reimplemented from fm.liveswitch.DataBuffer.

◆ getParent()

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.getParent ( )

Gets the Subset parent.

◆ keep()

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.keep ( )

Increment the retain count by one.

Reimplemented from fm.liveswitch.DataBuffer.

◆ prepend() [1/2]

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.prepend ( fm.liveswitch.DataBuffer  buffer)

Prepends a buffer.

Parameters
bufferThe buffer.

Reimplemented from fm.liveswitch.DataBuffer.

◆ prepend() [2/2]

void fm.liveswitch.DataBufferSubset.prepend ( fm.liveswitch.DataBuffer[]  buffers)

Prepends some buffers.

Parameters
buffersThe buffers.

Reimplemented from fm.liveswitch.DataBuffer.

◆ subset() [1/2]

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.subset ( int  offset)

Gets a subset of this instance.

Parameters
offsetThe offset.

Reimplemented from fm.liveswitch.DataBuffer.

◆ subset() [2/2]

fm.liveswitch.DataBuffer fm.liveswitch.DataBufferSubset.subset ( int  offset,
int  length 
)

Gets a subset of this instance.

Parameters
offsetThe offset.
lengthThe length.

Reimplemented from fm.liveswitch.DataBuffer.