The ByteView class.
More...
|
| ByteView (ByteArray byteArray) |
| Constructor of ByteView. More...
|
|
ByteArray | getByteArray () |
| Get underlying byte array of byte view. More...
|
|
long | getLength () |
| Get length of byte view. More...
|
|
long | findByteSequence (long startPos, long length, buffer, size_t bufferLength) |
| Find byte sequence. More...
|
|
byte | readByte (long position) |
| Read byte from byte view (position in bytes) More...
|
|
int | readSignedInt (long position, int length, ENDIAN_TYPE endianType) |
| Read signed integer from byte view. More...
|
|
int | readSignedIntBits (long position, int length, ENDIAN_TYPE endianType) |
| Read signed integer at bit position from byte view. Little endian numbers longer than one byte are treated left aligned, big endian numbers right aligned. More...
|
|
uint | readUnsignedInt (long position, int length, ENDIAN_TYPE endianType) |
| Read unsigned integer from byte view. More...
|
|
uint | readUnsignedIntBits (long position, int length, ENDIAN_TYPE endianType) |
| Read unsigned integer at bit position from byte view. Little endian numbers longer than one byte are treated left aligned, big endian numbers right aligned. More...
|
|
String | readString (long position, int length, String encoding) |
| Read string from byte view. More...
|
|
The ByteView class.
A byte view object is a proxy to a ByteArray object.
- Author
- Andreas Pehnack
- Date
- 2009-12-12
Constructor of ByteView.
- Author
- Andreas Pehnack
- Date
- 2011-09-01
- Parameters
-
[in] | byteArray | Byte array to create byte view for |
- Returns
- New byte view
long findByteSequence |
( |
long |
startPos, |
|
|
long |
length, |
|
|
buffer |
, |
|
|
size_t |
bufferLength |
|
) |
| |
Find byte sequence.
- Author
- Andreas Pehnack
- Date
- 2015-10-26
- Returns
- Position where byte sequence was found, otherwise -1
Get underlying byte array of byte view.
- Author
- Andreas Pehnack
- Date
- 2015-12-02
- Returns
- Byte array of byte view
Get length of byte view.
- Author
- Andreas Pehnack
- Date
- 2011-09-01
- Returns
- Length of byte view
byte readByte |
( |
long |
position | ) |
|
Read byte from byte view (position in bytes)
- Author
- Andreas Pehnack
- Date
- 2009-12-12
- Parameters
-
[in] | position | Position where to read the byte |
- Returns
- Byte at position
- See also
- readSignedInt()
-
readUnsignedInt()
int readSignedInt |
( |
long |
position, |
|
|
int |
length, |
|
|
ENDIAN_TYPE |
endianType |
|
) |
| |
Read signed integer from byte view.
- Author
- Andreas Pehnack
- Date
- 2009-12-12
- Parameters
-
[in] | position | Position where to read the number |
[in] | length | Length of the number in bytes |
[in] | endianType | Little/big endian |
- Returns
- Signed int at position
- See also
- readByte()
-
readUnsignedInt()
int readSignedIntBits |
( |
long |
position, |
|
|
int |
length, |
|
|
ENDIAN_TYPE |
endianType |
|
) |
| |
Read signed integer at bit position from byte view. Little endian numbers longer than one byte are treated left aligned, big endian numbers right aligned.
- Author
- Andreas Pehnack
- Date
- 2009-12-12
- Parameters
-
[in] | position | Bit position where to read the number |
[in] | length | Length of the number in bits |
[in] | endianType | Little/big endian |
- Returns
- Unsigned int at bit position
- See also
- readByte()
-
readUnsignedInt()
String readString |
( |
long |
position, |
|
|
int |
length, |
|
|
String |
encoding |
|
) |
| |
Read string from byte view.
- Author
- Andreas Pehnack
- Date
- 2009-12-12
- Parameters
-
[in] | position | Position where to read the string |
[in] | length | Length of the string in bytes |
[in] | encoding | Encoding of the string |
- Returns
- String at position
- See also
- readByte()
-
readSignedInt()
-
readUnsignedInt()
uint readUnsignedInt |
( |
long |
position, |
|
|
int |
length, |
|
|
ENDIAN_TYPE |
endianType |
|
) |
| |
Read unsigned integer from byte view.
- Author
- Andreas Pehnack
- Date
- 2009-12-12
- Parameters
-
[in] | position | Position where to read the number |
[in] | length | Length of the number in bytes |
[in] | endianType | Little/big endian |
- Returns
- Unsigned int at position
- See also
- readByte()
-
readSignedInt()
uint readUnsignedIntBits |
( |
long |
position, |
|
|
int |
length, |
|
|
ENDIAN_TYPE |
endianType |
|
) |
| |
Read unsigned integer at bit position from byte view. Little endian numbers longer than one byte are treated left aligned, big endian numbers right aligned.
- Author
- Andreas Pehnack
- Date
- 2009-12-12
- Parameters
-
[in] | position | Bit position where to read the number |
[in] | length | Length of the number in bits |
[in] | endianType | Little/big endian |
- Returns
- Unsigned int at bit position
- See also
- readByte()
-
readUnsignedInt()
The documentation for this class was generated from the following file:
- Generated/synalysis_wrap_lua.cpp