# StreamReader

from pandac.PandaModules import StreamReader

Class : StreamReader
Description : A class to read sequential binary data directly from an istream. Its interface is similar to DatagramIterator by design; see also StreamWriter.

## Inheritance:

StreamReader:

## Methods of StreamReader:

extractBytes
getBeFloat32
getBeFloat64
getBeInt16
getBeInt32
getBeInt64
getBeUint16
getBeUint32
getBeUint64
getBool
getFixedString
getFloat32
getFloat64
getInt16
getInt32
getInt64
getInt8
getIstream
getString
getString32
getUint16
getUint32
getUint64
getUint8
getZString
operator =
readline
skipBytes

extractBytes string StreamReader::extract_bytes(unsigned int size); Description: Extracts the indicated number of bytes in the stream and returns them as a string.

getBeFloat32 float StreamReader::get_be_float32(void); Description: Extracts a 32-bit single-precision big-endian floating-point number. Since this kind of float is not necessarily portable across different architectures, special care is required.

getBeFloat64 double StreamReader::get_be_float64(void); Description: Extracts a 64-bit big-endian floating-point number.

getBeInt16 short int StreamReader::get_be_int16(void); Description: Extracts a signed big-endian 16-bit integer.

getBeInt32 int StreamReader::get_be_int32(void); Description: Extracts a signed big-endian 32-bit integer.

getBeInt64 __int64 StreamReader::get_be_int64(void); Description: Extracts a signed big-endian 64-bit integer.

getBeUint16 unsigned short int StreamReader::get_be_uint16(void); Description: Extracts an unsigned big-endian 16-bit integer.

getBeUint32 unsigned int StreamReader::get_be_uint32(void); Description: Extracts an unsigned big-endian 32-bit integer.

getBeUint64 unsigned __int64 StreamReader::get_be_uint64(void); Description: Extracts an unsigned big-endian 64-bit integer.

getBool bool StreamReader::get_bool(void); Description: Extracts a boolean value.

getFixedString string StreamReader::get_fixed_string(unsigned int size); Description: Extracts a fixed-length string. However, if a zero byte occurs within the string, it marks the end of the string.

getFloat32 float StreamReader::get_float32(void); Description: Extracts a 32-bit single-precision floating-point number. Since this kind of float is not necessarily portable across different architectures, special care is required.

getFloat64 double StreamReader::get_float64(void); Description: Extracts a 64-bit floating-point number.

getInt16 short int StreamReader::get_int16(void); Description: Extracts a signed 16-bit integer.

getInt32 int StreamReader::get_int32(void); Description: Extracts a signed 32-bit integer.

getInt64 __int64 StreamReader::get_int64(void); Description: Extracts a signed 64-bit integer.

getInt8 signed char StreamReader::get_int8(void); Description: Extracts a signed 8-bit integer.

getIstream istream *StreamReader::get_istream(void) const; Description: Returns the stream in use.

getString string StreamReader::get_string(void); Description: Extracts a variable-length string.

getString32 string StreamReader::get_string32(void); Description: Extracts a variable-length string with a 32-bit length field.

getUint16 unsigned short int StreamReader::get_uint16(void); Description: Extracts an unsigned 16-bit integer.

getUint32 unsigned int StreamReader::get_uint32(void); Description: Extracts an unsigned 32-bit integer.

getUint64 unsigned __int64 StreamReader::get_uint64(void); Description: Extracts an unsigned 64-bit integer.

getUint8 unsigned char StreamReader::get_uint8(void); Description: Extracts an unsigned 8-bit integer.

getZString string StreamReader::get_z_string(void); Description: Extracts a variable-length string, as a NULL-terminated string.

operator = void StreamReader::operator =(StreamReader const &copy); Description: The copy constructor does not copy ownership of the stream.

readline string StreamReader::readline(void); Description: Assumes the stream represents a text file, and extracts one line up to and including the trailing newline character. Returns empty string when the end of file is reached. The interface here is intentionally designed to be similar to that for Python's File.readline() function.

skipBytes void StreamReader::skip_bytes(unsigned int size); Description: Skips over the indicated number of bytes in the stream.