Photon Server API Documentation v5.0RC1

Public Member Functions | Properties | List of all members
ExitGames.IO.BigEndianBinaryReader Class Reference

DataInputStreamWrapper provides functions to Read binary data from a stream. More...

Inheritance diagram for ExitGames.IO.BigEndianBinaryReader:
ExitGames.IO.IBinaryReader

Public Member Functions

 BigEndianBinaryReader (Stream stream)
 Initializes a new instance of the BigEndianBinaryReader class. More...
 
int Read (byte[] buffer, int offset, int count)
 Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. More...
 
bool ReadBoolean ()
 Reads a Boolean value from the current stream and advances the current position of the stream by one byte. More...
 
byte ReadByte ()
 Reads the next byte from the current stream and advances the current position of the stream by one byte. More...
 
byte[] ReadBytes (int length)
 Reads bytes. More...
 
char ReadChar ()
 Reads a char. More...
 
double ReadDouble ()
 Reads an 8-byte floating point value from the current stream and advances the current position of the stream by eight bytes. More...
 
short ReadInt16 ()
 Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two bytes. More...
 
int ReadInt32 ()
 Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four bytes. More...
 
long ReadInt64 ()
 Read a long (64 bit) from the stream. More...
 
float ReadSingle ()
 Reads an 4-byte floating point value from the current stream and advances the current position of the stream by four bytes. More...
 

Properties

Stream BaseStream [get]
 Gets the underlying stream of the BigEndianBinaryReader. More...
 
- Properties inherited from ExitGames.IO.IBinaryReader
Stream BaseStream [get]
 Gets the base stream. More...
 

Detailed Description

DataInputStreamWrapper provides functions to Read binary data from a stream.

Constructor & Destructor Documentation

◆ BigEndianBinaryReader()

ExitGames.IO.BigEndianBinaryReader.BigEndianBinaryReader ( Stream  stream)
inline

Initializes a new instance of the BigEndianBinaryReader class.

Parameters
streamThe stream to read from.
Exceptions
ArgumentNullExceptionstream is null.

Member Function Documentation

◆ Read()

int ExitGames.IO.BigEndianBinaryReader.Read ( byte[]  buffer,
int  offset,
int  count 
)
inline

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Parameters
bufferAn array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offsetThe zero-based byte offset in buffer at which to begin storing the data read from the current stream.
countThe maximum number of bytes to be read from the current stream.
Returns
The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.

Implements ExitGames.IO.IBinaryReader.

◆ ReadBoolean()

bool ExitGames.IO.BigEndianBinaryReader.ReadBoolean ( )
inline

Reads a Boolean value from the current stream and advances the current position of the stream by one byte.

Returns
Type: System.Boolean True if the byte is nonzero; otherwise, false.

Implements ExitGames.IO.IBinaryReader.

◆ ReadByte()

byte ExitGames.IO.BigEndianBinaryReader.ReadByte ( )
inline

Reads the next byte from the current stream and advances the current position of the stream by one byte.

Returns
The read byte.

Implements ExitGames.IO.IBinaryReader.

◆ ReadBytes()

byte [] ExitGames.IO.BigEndianBinaryReader.ReadBytes ( int  length)
inline

Reads bytes.

Parameters
lengthThe length.
Returns
A byte array.

Implements ExitGames.IO.IBinaryReader.

◆ ReadChar()

char ExitGames.IO.BigEndianBinaryReader.ReadChar ( )
inline

Reads a char.

Returns
The read char.

Implements ExitGames.IO.IBinaryReader.

◆ ReadDouble()

double ExitGames.IO.BigEndianBinaryReader.ReadDouble ( )
inline

Reads an 8-byte floating point value from the current stream and advances the current position of the stream by eight bytes.

Returns
The read double.

Implements ExitGames.IO.IBinaryReader.

◆ ReadInt16()

short ExitGames.IO.BigEndianBinaryReader.ReadInt16 ( )
inline

Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two bytes.

Returns
Type: System.Int16 A 2-byte signed integer read from the current stream.
Exceptions
System.ObjectDisposedExceptionThe stream is closed.

Implements ExitGames.IO.IBinaryReader.

◆ ReadInt32()

int ExitGames.IO.BigEndianBinaryReader.ReadInt32 ( )
inline

Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four bytes.

Type: System.Int32 A 4-byte signed integer read from the current stream.

Returns
The read int 32.

Implements ExitGames.IO.IBinaryReader.

◆ ReadInt64()

long ExitGames.IO.BigEndianBinaryReader.ReadInt64 ( )
inline

Read a long (64 bit) from the stream.

Returns
A long.

Implements ExitGames.IO.IBinaryReader.

◆ ReadSingle()

float ExitGames.IO.BigEndianBinaryReader.ReadSingle ( )
inline

Reads an 4-byte floating point value from the current stream and advances the current position of the stream by four bytes.

Returns
The read single.

Implements ExitGames.IO.IBinaryReader.

Property Documentation

◆ BaseStream

Stream ExitGames.IO.BigEndianBinaryReader.BaseStream
get

Gets the underlying stream of the BigEndianBinaryReader.