|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSystem.IO.BinaryReader
Microsoft.Xna.Framework.Net.PacketReader
public class PacketReader
Provides common functionality for efficiently reading incoming network packets. Reference page contains links to related code samples.
Constructor Summary | |
---|---|
PacketReader()
Initializes an empty instance of PacketReader. |
|
PacketReader(int capacity)
Initializes an empty instance of PacketReader with the specified options. |
Method Summary | |
---|---|
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. |
Methods inherited from class System.IO.BinaryReader |
---|
Close, Dispose, Dispose, FillBuffer, getBaseStream, PeekChar, Read, Read, Read, Read7BitEncodedInt, ReadBoolean, ReadByte, ReadBytes, ReadChar, ReadChars, ReadInt16, ReadInt32, ReadInt64, ReadString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PacketReader()
public PacketReader(int capacity)
capacity
- Initial capacity for a received network packet.Method Detail |
---|
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |