public class PacketReader extends BinaryReader
Constructor and Description |
---|
PacketReader()
Initializes an empty instance of PacketReader.
|
PacketReader(int capacity)
Initializes an empty instance of PacketReader with the specified options.
|
Modifier and Type | Method and Description |
---|---|
int |
getPosition()
Gets the current packet read position.
|
int |
Length()
Gets the length of the packet being read.
|
Color |
ReadColor()
Reads a Color value.
|
double |
ReadDouble()
Reads an 8-byte floating point value.
|
Matrix |
ReadMatrix()
Reads a Matrix value.
|
Quaternion |
ReadQuaternion()
Reads a Quaternion value.
|
float |
ReadSingle()
Reads a 4-byte floating point value.
|
Vector2 |
ReadVector2()
Reads a Vector2 value.
|
Vector3 |
ReadVector3()
Reads a Vector3 value.
|
Vector4 |
ReadVector4()
Reads a Vector4 value.
|
void |
setPosition(int value)
Sets the current packet read position.
|
Close, Dispose, Dispose, FillBuffer, getBaseStream, Read, Read, Read, Read7BitEncodedInt, ReadBoolean, ReadByte, ReadBytes, ReadChar, ReadChars, ReadInt16, ReadInt32, ReadInt64, ReadString
public PacketReader()
public PacketReader(int capacity)
capacity
- Initial capacity for a received network packet.public int Length()
public int getPosition()
public void setPosition(int value)
public Color ReadColor()
public double ReadDouble()
ReadDouble
in class BinaryReader
public Matrix ReadMatrix()
public Quaternion ReadQuaternion()
public float ReadSingle()
ReadSingle
in class BinaryReader
public Vector2 ReadVector2()
public Vector3 ReadVector3()
public Vector4 ReadVector4()