PacketIO Class |
Namespace: Demo3D.IO
public abstract class PacketIO : PacketPosition, IOffsetDataReader
The PacketIO type exposes the following members.
| Name | Description | |
|---|---|---|
| DataLengthOfParent |
Returns the length in bytes from this position to the current parent packet Position.
For a PacketReader this is the length from this PacketPosition to our parents current Position.
For a PacketWriter it's the length from this PacketPosition to the end of our Parent packet.
(Inherited from PacketPosition.) | |
| Endian |
Endianess for integral types.
| |
| ID |
Optional ID used in error messages.
| |
| IsFixed |
Returns true if this is a fixed size packet. Ensure can't expand a fixed packet.
| |
| Length |
Returns the current length of the packet.
The Length of a packet may change without Ensure being called if it's an expandable PacketWriter and data is inserted.
| |
| LengthToCurrentPositionOfParent |
Returns the length in bytes from this position to the current position of our parent packet.
(Inherited from PacketPosition.) | |
| LengthToEndOfParent |
Returns the length in bytes from this position to the end of our parent packet.
(Overrides PacketPositionLengthToEndOfParent.) | |
| Parent |
Returns the parent packet, or null.
(Inherited from PacketPosition.) | |
| Position |
Returns the current position in this packet.
The Position of a packet may change without Advance being called if it's an expandable PacketWriter and data is inserted.
| |
| PositionInParent |
Returns the current position with respect to our parent packet.
(Overrides PacketPositionPositionInParent.) | |
| Remaining |
Returns the remaining data/space available in this packet. If it's a fixed-size packet, then this is definitive.
Otherwise Ensure can be used to try to extend the packet with more data/space.
| |
| TextEncoding |
Encoding for text strings.
| |
| Top |
Returns the top parent.
|
| Name | Description | |
|---|---|---|
| Advance |
Advances the current packet position. Implies Ensure(length).
| |
| Ensure |
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.
| |
| GetBuffer |
Get a buffer that covers a specific portion of the packet.
| |
| GetEndian |
Returns the current endian format.
| |
| GetTextEncoding |
Returns the current text encoding.
| |
| LengthAfterChild |
Returns the length of the this packet after the end of a given direct child packet position.
| |
| MarkPosition |
Return a position marker.
| |
| PositionOfChild |
Returns the current absolute position of a direct child packet position.
| |
| ReadBit |
Reads a bit at offset in the buffer.
| |
| ReadBoolean |
Reads a boolean at offset in the buffer.
| |
| ReadByte |
Reads a byte at offset in the buffer.
| |
| ReadBytes(Int32, Buffer) |
Reads a number of bytes at offset in the buffer.
| |
| ReadBytes(Int32, Int32) |
Reads a number of bytes at offset in the buffer.
| |
| ReadBytes(Int32, PacketWriter, Int32) |
Reads a number of bytes at offset in the buffer.
| |
| ReadBytes(Int32, Byte, Int32, Int32) |
Reads a number of bytes at offset in the buffer.
| |
| ReadChar |
Reads a character at offset in the buffer.
| |
| ReadDouble |
Reads a 64bit double floating point number at offset in the buffer.
| |
| ReadDoubleBE |
Reads a 64bit double floating point number at offset in the buffer.
| |
| ReadDoubleLE |
Reads a 64bit double floating point number at offset in the buffer.
| |
| ReadInt16 |
Reads a 16bit signed integer at offset in the buffer.
| |
| ReadInt16BE |
Reads a 16bit signed integer at offset in the buffer.
| |
| ReadInt16LE |
Reads a 16bit signed integer at offset in the buffer.
| |
| ReadInt32 |
Reads a 32bit signed integer at offset in the buffer.
| |
| ReadInt32BE |
Reads a 32bit signed integer at offset in the buffer.
| |
| ReadInt32LE |
Reads a 32bit signed integer at offset in the buffer.
| |
| ReadInt64 |
Reads a 64bit signed integer at offset in the buffer.
| |
| ReadInt64BE |
Reads a 64bit signed integer at offset in the buffer.
| |
| ReadInt64LE |
Reads a 64bit signed integer at offset in the buffer.
| |
| ReadSByte |
Reads a signed byte at offset in the buffer.
| |
| ReadSingle |
Reads a 32bit single floating point number at offset in the buffer.
| |
| ReadSingleBE |
Reads a 32bit single floating point number at offset in the buffer.
| |
| ReadSingleLE |
Reads a 32bit single floating point number at offset in the buffer.
| |
| ReadString(Int32) |
Reads a string at offset in the buffer.
| |
| ReadString(Int32, BinaryTextEncoding) |
Reads a string at offset in the buffer.
| |
| ReadUInt16 |
Reads a 16bit unsigned integer at offset in the buffer.
| |
| ReadUInt16BE |
Reads a 16bit unsigned integer at offset in the buffer.
| |
| ReadUInt16LE |
Reads a 16bit unsigned integer at offset in the buffer.
| |
| ReadUInt32 |
Reads a 32bit unsigned integer at offset in the buffer.
| |
| ReadUInt32BE |
Reads a 32bit unsigned integer at offset in the buffer.
| |
| ReadUInt32LE |
Reads a 32bit unsigned integer at offset in the buffer.
| |
| ReadUInt64 |
Reads a 64bit unsigned integer at offset in the buffer.
| |
| ReadUInt64BE |
Reads a 64bit unsigned integer at offset in the buffer.
| |
| ReadUInt64LE |
Reads a 64bit unsigned integer at offset in the buffer.
|