Click or drag to resize

PacketReader Methods

The PacketReader type exposes the following members.

Methods
  NameDescription
Public methodAdvance
Advances the current packet position. Implies Ensure(length).
(Inherited from PacketIO.)
Public methodClose
Closes the current reader and closes access to the underlying stream.
Protected methodClosePacket
Close access to any associated data stream.
Public methodConsume
Returns a new packet pointing to the next length bytes, and advances the current packet position. Implies Ensure(length).
Public methodStatic memberCreate(Byte, Endian, BinaryTextEncoding)
Creates a fixed size PacketReader from a buffer of data.
Public methodStatic memberCreate(Buffer, Endian, BinaryTextEncoding)
Creates a fixed size PacketReader from a buffer of data.
Public methodStatic memberCreate(Stream, Endian, BinaryTextEncoding, IEnumerableBuffer)
Creates a PacketReader from a stream of data. The underlying stream is left open when the PacketReader is closed.
Public methodStatic memberCreate(PacketReaderPacketIOMethods, Endian, BinaryTextEncoding, IEnumerableBuffer)
Creates a PacketReader.
Public methodStatic memberCreate(Byte, Int32, Int32, Endian, BinaryTextEncoding)
Creates a fixed size PacketReader from a buffer of data.
Public methodStatic memberCreate(Stream, PacketKey, Endian, BinaryTextEncoding, IEnumerableBuffer)
Creates a PacketReader from a stream of data. The underlying stream is left open when the PacketReader is closed.
Public methodStatic memberCreate(Buffer, Int32, Int32, Endian, BinaryTextEncoding)
Creates a fixed size PacketReader from a buffer of data.
Public methodDispose
Closes the current reader and closes access to the underlying stream.
Public methodEnsure
Ensure that the next length bytes of data/space are available in the packet. If there isn't enough already available, and the packet isn't fixed, then it'll attempt to read more data into or create more space in the packet.
(Inherited from PacketIO.)
Protected methodEnsureAdditionalDataAsync
Wait for at least length additional data to become available.
Public methodEnsureAsync
Ensure that the next length bytes of data is available in the packet. If there isn't enough already available, and the packet isn't fixed, then it'll attempt to read more data into the packet.
Protected methodGetBuffer
Get a buffer that covers a specific portion of the packet.
(Inherited from PacketIO.)
Protected methodGetEndian
Returns the current endian format.
(Inherited from PacketIO.)
Protected methodGetTextEncoding
Returns the current text encoding.
(Inherited from PacketIO.)
Protected methodLengthAfterChild
Returns the length of the this packet after the end of a given direct child packet position.
(Overrides PacketIOLengthAfterChild(PacketIO).)
Public methodMarkPosition
Return a position marker.
(Overrides PacketIOMarkPosition.)
Public methodPeek
Returns a new packet pointing to the next length bytes, but does not advance the current packet position. Implies Ensure(length).
Protected methodPositionOfChild
Returns the current absolute position of a direct child packet position.
(Overrides PacketIOPositionOfChild(PacketIO).)
Public methodPrune
Declare that we'll not want to read length bytes again, allowing the packet to free memory. Advances ValidFrom by length bytes.
Public methodReadBit(Int32)
Reads a bit from the current position in the packet packet. The current position is advanced by 1 byte.
Public methodReadBit(Int32, Int32)
Reads a bit at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadBoolean
Reads a boolean from the current position in the packet packet. The current position is advanced by 1 byte.
Public methodReadBoolean(Int32)
Reads a boolean at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadByte
Reads a byte from the current position in the packet packet. The current position is advanced by 1 byte.
Public methodReadByte(Int32)
Reads a byte at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadBytes(Int32)
Reads a number of bytes from the current position in the packet packet. The current position is advanced by the number of bytes read.
Public methodReadBytes(Buffer)
Reads a number of bytes from the current position in the packet packet. The current position is advanced by the number of bytes read.
Public methodReadBytes(Int32, Buffer)
Reads a number of bytes at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadBytes(Int32, Int32)
Reads a number of bytes at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadBytes(PacketWriter, Int32)
Reads a number of bytes from the current position in the packet packet. The current position is advanced by the number of bytes read.
Public methodReadBytes(Int32, PacketWriter, Int32)
Reads a number of bytes at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadBytes(Byte, Int32, Int32)
Reads a number of bytes from the current position in the packet packet. The current position is advanced by the number of bytes read.
Public methodReadBytes(Int32, Byte, Int32, Int32)
Reads a number of bytes at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadChar
Reads a character from the current position in the packet packet. The current position is advanced by 1 byte.
Public methodReadChar(Int32)
Reads a character at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadDouble(Endian)
Reads a 64bit double floating point number from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadDouble(Int32, Endian)
Reads a 64bit double floating point number at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadDoubleBE
Reads a 64bit double floating point number from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadDoubleBE(Int32)
Reads a 64bit double floating point number at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadDoubleLE
Reads a 64bit double floating point number from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadDoubleLE(Int32)
Reads a 64bit double floating point number at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt16(Endian)
Reads a 16bit signed integer from the current position in the packet packet. The current position is advanced by 2 bytes.
Public methodReadInt16(Int32, Endian)
Reads a 16bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt16BE
Reads a 16bit signed integer from the current position in the packet packet. The current position is advanced by 2 bytes.
Public methodReadInt16BE(Int32)
Reads a 16bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt16LE
Reads a 16bit signed integer from the current position in the packet packet. The current position is advanced by 2 bytes.
Public methodReadInt16LE(Int32)
Reads a 16bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt32(Endian)
Reads a 32bit signed integer from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadInt32(Int32, Endian)
Reads a 32bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt32BE
Reads a 32bit signed integer from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadInt32BE(Int32)
Reads a 32bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt32LE
Reads a 32bit signed integer from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadInt32LE(Int32)
Reads a 32bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt64(Endian)
Reads a 64bit signed integer from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadInt64(Int32, Endian)
Reads a 64bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt64BE
Reads a 64bit signed integer from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadInt64BE(Int32)
Reads a 64bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadInt64LE
Reads a 64bit signed integer from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadInt64LE(Int32)
Reads a 64bit signed integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadSByte
Reads a signed byte from the current position in the packet packet. The current position is advanced by 1 byte.
Public methodReadSByte(Int32)
Reads a signed byte at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadSingle(Endian)
Reads a 32bit single floating point number from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadSingle(Int32, Endian)
Reads a 32bit single floating point number at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadSingleBE
Reads a 32bit single floating point number from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadSingleBE(Int32)
Reads a 32bit single floating point number at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadSingleLE
Reads a 32bit single floating point number from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadSingleLE(Int32)
Reads a 32bit single floating point number at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadString
Reads a string from the current position in the packet packet. The current position is advanced by the number of bytes read.
Public methodReadString(Int32)
Reads a string at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadString(BinaryTextEncoding)
Reads a string from the current position in the packet packet. The current position is advanced by the number of bytes read.
Public methodReadString(Int32, BinaryTextEncoding)
Reads a string at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt16(Endian)
Reads a 16bit unsigned integer from the current position in the packet packet. The current position is advanced by 2 bytes.
Public methodReadUInt16(Int32, Endian)
Reads a 16bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt16BE
Reads a 16bit unsigned integer from the current position in the packet packet. The current position is advanced by 2 bytes.
Public methodReadUInt16BE(Int32)
Reads a 16bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt16LE
Reads a 16bit unsigned integer from the current position in the packet packet. The current position is advanced by 2 bytes.
Public methodReadUInt16LE(Int32)
Reads a 16bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt32(Endian)
Reads a 32bit unsigned integer from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadUInt32(Int32, Endian)
Reads a 32bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt32BE
Reads a 32bit unsigned integer from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadUInt32BE(Int32)
Reads a 32bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt32LE
Reads a 32bit unsigned integer from the current position in the packet packet. The current position is advanced by 4 bytes.
Public methodReadUInt32LE(Int32)
Reads a 32bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt64(Endian)
Reads a 64bit unsigned integer from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadUInt64(Int32, Endian)
Reads a 64bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt64BE
Reads a 64bit unsigned integer from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadUInt64BE(Int32)
Reads a 64bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Public methodReadUInt64LE
Reads a 64bit unsigned integer from the current position in the packet packet. The current position is advanced by 8 bytes.
Public methodReadUInt64LE(Int32)
Reads a 64bit unsigned integer at offset in the buffer.
(Inherited from PacketIO.)
Top
See Also