A data buffer stream. More...
Public Member Functions | |
DataBufferStream (fm.liveswitch.DataBuffer buffer) | |
Initializes a new instance of the fm.liveswitch.DataBufferStream class. More... | |
DataBufferStream (int dataBufferSize) | |
Initializes a new instance of the fm.liveswitch.DataBufferStream class. More... | |
DataBufferStream (int dataBufferSize, boolean littleEndian) | |
Initializes a new instance of the fm.liveswitch.DataBufferStream class. More... | |
int | getAvailable () |
Gets the available bytes to be read from the DataBuffer. More... | |
byte | getBitPosition () |
Gets the bit position within a byte. More... | |
fm.liveswitch.DataBuffer | getBuffer () |
Gets the buffer. More... | |
int | getLength () |
Gets the buffer length. More... | |
int | getPosition () |
Gets the position within the stream. More... | |
void | nextByte () |
Resets the bit count to 0 and advances to the next byte. More... | |
int | peek () |
Reads an 8-bit value from the DataBuffer without advancing the Position. More... | |
fm.liveswitch.DataBuffer | read (int length) |
Reads the specified length from the DataBuffer and advances the position by the length. More... | |
boolean | read1 () |
Read a single bit and advance the bit position by 1. More... | |
int | read15 () |
Reads an 15-bit value from the DataBuffer and advances the Position by 1 and the BitPosition by 7. More... | |
int | read16 () |
Reads an 16-bit value from the DataBuffer and advances the Position by 2. More... | |
int | read2 () |
Read a 2-bit value and advance the BitPosition by 2. More... | |
int | read24 () |
Reads an 24-bit value from the DataBuffer and advances the Position by 3. More... | |
int | read3 () |
Read a 3-bit value and advance the BitPosition by 3. More... | |
long | read32 () |
Reads an 32-bit value from the DataBuffer and advances the Position by 4. More... | |
int | read4 () |
Read a 4-bit value and advance the BitPosition by 4. More... | |
long | read40 () |
Reads an 40-bit value from the DataBuffer and advances the Position by 5. More... | |
long | read48 () |
Reads an 48-bit value from the DataBuffer and advances the Position by 6. More... | |
long | read56 () |
Reads an 56-bit value from the DataBuffer and advances the Position by 7. More... | |
long | read64 () |
Reads an 64-bit value from the DataBuffer and advances the Position by 8. More... | |
int | read7 () |
Reads an 7-bit value from the DataBuffer and advances the BitPosition by 7. More... | |
int | read8 () |
Reads an 8-bit value from the DataBuffer and advances the Position by 1. More... | |
int | readByte () |
Reads a single byte from the stream and advances the Position by 1. More... | |
byte[] | readBytes (int length) |
Read a specified number of bytes from the DataBuffer and advance the Position by that number. More... | |
void | setBitPosition (byte value) |
Sets the bit position within a byte. More... | |
void | setPosition (int value) |
Sets the position within the stream. More... | |
fm.liveswitch.DataBufferStream | write (fm.liveswitch.DataBuffer buffer) |
Writes the specified buffer to the DataBuffer and advances the Position by the length of the buffer. More... | |
fm.liveswitch.DataBufferStream | write16 (int value) |
Writes an 16-bit value to the DataBuffer and advances the Position by 2. More... | |
fm.liveswitch.DataBufferStream | write32 (long value) |
Writes an 32-bit value to the DataBuffer and advances the Position by 4. More... | |
fm.liveswitch.DataBufferStream | write64 (long value) |
Writes an 64-bit value to the DataBuffer and advances the Position by 8. More... | |
fm.liveswitch.DataBufferStream | write8 (int value) |
Writes an 8-bit value to the DataBuffer and advances the Position by 1. More... | |
fm.liveswitch.DataBufferStream | writeBytes (byte[] data) |
Writes the specified data to the DataBuffer and advances the Position by the length of the data. More... | |
fm.liveswitch.DataBufferStream | writeBytes (byte[] data, int index, int length) |
Writes the specified data to the DataBuffer and advances the Position by the length. More... | |
A data buffer stream.
fm.liveswitch.DataBufferStream.DataBufferStream | ( | fm.liveswitch.DataBuffer | buffer | ) |
Initializes a new instance of the fm.liveswitch.DataBufferStream class.
buffer | The buffer. |
fm.liveswitch.DataBufferStream.DataBufferStream | ( | int | dataBufferSize | ) |
Initializes a new instance of the fm.liveswitch.DataBufferStream class.
dataBufferSize | Size of the data buffer. |
fm.liveswitch.DataBufferStream.DataBufferStream | ( | int | dataBufferSize, |
boolean | littleEndian | ||
) |
Initializes a new instance of the fm.liveswitch.DataBufferStream class.
dataBufferSize | Size of the data buffer. |
littleEndian | Whether the data is little-endian. |
int fm.liveswitch.DataBufferStream.getAvailable | ( | ) |
Gets the available bytes to be read from the DataBuffer.
byte fm.liveswitch.DataBufferStream.getBitPosition | ( | ) |
Gets the bit position within a byte.
fm.liveswitch.DataBuffer fm.liveswitch.DataBufferStream.getBuffer | ( | ) |
Gets the buffer.
int fm.liveswitch.DataBufferStream.getLength | ( | ) |
Gets the buffer length.
int fm.liveswitch.DataBufferStream.getPosition | ( | ) |
Gets the position within the stream.
void fm.liveswitch.DataBufferStream.nextByte | ( | ) |
Resets the bit count to 0 and advances to the next byte.
int fm.liveswitch.DataBufferStream.peek | ( | ) |
Reads an 8-bit value from the DataBuffer without advancing the Position.
fm.liveswitch.DataBuffer fm.liveswitch.DataBufferStream.read | ( | int | length | ) |
Reads the specified length from the DataBuffer and advances the position by the length.
length | The length. |
boolean fm.liveswitch.DataBufferStream.read1 | ( | ) |
Read a single bit and advance the bit position by 1.
int fm.liveswitch.DataBufferStream.read15 | ( | ) |
Reads an 15-bit value from the DataBuffer and advances the Position by 1 and the BitPosition by 7.
int fm.liveswitch.DataBufferStream.read16 | ( | ) |
Reads an 16-bit value from the DataBuffer and advances the Position by 2.
int fm.liveswitch.DataBufferStream.read2 | ( | ) |
Read a 2-bit value and advance the BitPosition by 2.
int fm.liveswitch.DataBufferStream.read24 | ( | ) |
Reads an 24-bit value from the DataBuffer and advances the Position by 3.
int fm.liveswitch.DataBufferStream.read3 | ( | ) |
Read a 3-bit value and advance the BitPosition by 3.
long fm.liveswitch.DataBufferStream.read32 | ( | ) |
Reads an 32-bit value from the DataBuffer and advances the Position by 4.
int fm.liveswitch.DataBufferStream.read4 | ( | ) |
Read a 4-bit value and advance the BitPosition by 4.
long fm.liveswitch.DataBufferStream.read40 | ( | ) |
Reads an 40-bit value from the DataBuffer and advances the Position by 5.
long fm.liveswitch.DataBufferStream.read48 | ( | ) |
Reads an 48-bit value from the DataBuffer and advances the Position by 6.
long fm.liveswitch.DataBufferStream.read56 | ( | ) |
Reads an 56-bit value from the DataBuffer and advances the Position by 7.
long fm.liveswitch.DataBufferStream.read64 | ( | ) |
Reads an 64-bit value from the DataBuffer and advances the Position by 8.
int fm.liveswitch.DataBufferStream.read7 | ( | ) |
Reads an 7-bit value from the DataBuffer and advances the BitPosition by 7.
int fm.liveswitch.DataBufferStream.read8 | ( | ) |
Reads an 8-bit value from the DataBuffer and advances the Position by 1.
int fm.liveswitch.DataBufferStream.readByte | ( | ) |
Reads a single byte from the stream and advances the Position by 1.
byte [] fm.liveswitch.DataBufferStream.readBytes | ( | int | length | ) |
Read a specified number of bytes from the DataBuffer and advance the Position by that number.
length | The number of bytes to read. |
void fm.liveswitch.DataBufferStream.setBitPosition | ( | byte | value | ) |
Sets the bit position within a byte.
void fm.liveswitch.DataBufferStream.setPosition | ( | int | value | ) |
Sets the position within the stream.
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.write | ( | fm.liveswitch.DataBuffer | buffer | ) |
Writes the specified buffer to the DataBuffer and advances the Position by the length of the buffer.
buffer | The buffer. |
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.write16 | ( | int | value | ) |
Writes an 16-bit value to the DataBuffer and advances the Position by 2.
value | The value. |
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.write32 | ( | long | value | ) |
Writes an 32-bit value to the DataBuffer and advances the Position by 4.
value | The value. |
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.write64 | ( | long | value | ) |
Writes an 64-bit value to the DataBuffer and advances the Position by 8.
value | The value. |
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.write8 | ( | int | value | ) |
Writes an 8-bit value to the DataBuffer and advances the Position by 1.
value | The value. |
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.writeBytes | ( | byte[] | data | ) |
Writes the specified data to the DataBuffer and advances the Position by the length of the data.
data | The data. |
fm.liveswitch.DataBufferStream fm.liveswitch.DataBufferStream.writeBytes | ( | byte[] | data, |
int | index, | ||
int | length | ||
) |
Writes the specified data to the DataBuffer and advances the Position by the length.
data | The data. |
index | The index. |
length | The length. |