Methods |
public
|
__construct(string $data, string $number_type = self::NUMBER_TYPE_LITTLEENDIAN)
|
#
|
public
|
getData(): string
|
#
|
public
|
getBuffer(): string
Return data currently in the buffer
Return data currently in the buffer
Returns
The data currently in the buffer
|
#
|
public
|
getLength(): int
Returns the number of bytes in the buffer
Returns the number of bytes in the buffer
Returns
|
#
|
public
|
read(int $length = 1): string
|
#
|
public
|
readLast(): string
Read the last character from the buffer Unlike the other read functions, this function actually removes
the character from the buffer.
Read the last character from the buffer Unlike the other read functions, this function actually removes
the character from the buffer.
|
#
|
public
|
lookAhead(int $length = 1): string
Look at the buffer, but don't remove
Look at the buffer, but don't remove
|
#
|
public
|
skip(int $length = 1)
Skip forward in the buffer
Skip forward in the buffer
|
#
|
public
|
jumpto($index)
Jump to a specific position in the buffer,
will not jump past end of buffer
Jump to a specific position in the buffer,
will not jump past end of buffer
|
#
|
public
|
getPosition(): int
Get the current pointer position
Get the current pointer position
|
#
|
public
|
readString(string $delim = "\x00"): string
Read from buffer until delimiter is reached If not found, return everything
Read from buffer until delimiter is reached If not found, return everything
Throws
|
#
|
public
|
readPascalString(int $offset = 0, bool $read_offset = false): string
Reads a pascal string from the buffer
Reads a pascal string from the buffer
Parameters
$offset |
Number of bits to cut off the end
|
$read_offset |
True if the data after the offset is to be read
|
Throws
|
#
|
public
|
readStringMulti($delims, null|string &$delimfound = null): string
Read from buffer until any of the delimiters is reached If not found, return everything
Read from buffer until any of the delimiters is reached If not found, return everything
Throws
|
#
|
public
|
readInt8(): int
Read an 8-bit unsigned integer
Read an 8-bit unsigned integer
Throws
|
#
|
public
|
readInt8Signed(): int
Read and 8-bit signed integer
Read and 8-bit signed integer
Throws
|
#
|
public
|
readInt16(): int
Read a 16-bit unsigned integer
Read a 16-bit unsigned integer
Throws
|
#
|
public
|
readInt16Signed(): int
Read a 16-bit signed integer
Read a 16-bit signed integer
Throws
|
#
|
public
|
readInt32($length = 4): int
Read a 32-bit unsigned integer
Read a 32-bit unsigned integer
Throws
|
#
|
public
|
readInt32Signed(): int
Read a 32-bit signed integer
Read a 32-bit signed integer
Throws
|
#
|
public
|
readInt64(): int
Read a 64-bit unsigned integer
Read a 64-bit unsigned integer
Throws
|
#
|
public
|
readFloat32(): float
|
#
|