Class games.Battle.shared.comm.CountPacket
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.shared.comm.CountPacket
java.lang.Object
|
+----games.Battle.shared.comm.BattlePacket
|
+----games.Battle.shared.comm.CountPacket
- public class CountPacket
- extends BattlePacket
A special packet that indicates hoa many packets are about to follow. This
is used by the server before a series of WhoInfo, GameInfo, or chat packets.
The count is internally limited to 255.
-
CountPacket()
- construct a CountPacket with a value of 0.
-
CountPacket(int)
- construct a CountPacket with a particular value.
-
asciiDump()
- Dump a text version of this packet, for debugging.
-
fromBytes(byte[])
- With the given array of bytes, fill this object
with data.
-
getCount()
- Return the count
-
toBytes()
- Convert this packet to an array of bytes for transmission.
-
toString()
- convert to a string representation
CountPacket
public CountPacket()
- construct a CountPacket with a value of 0. Used before reading in
an actual CountPacket from a stream.
CountPacket
public CountPacket(int count)
- construct a CountPacket with a particular value. Used before writing
the CountPacket to a stream.
- Parameters:
- count - the count of items that will follow this packet
toString
public String toString()
- convert to a string representation
- Overrides:
- toString in class Object
asciiDump
public void asciiDump()
- Dump a text version of this packet, for debugging.
getCount
public final int getCount()
- Return the count
toBytes
protected byte[] toBytes()
- Convert this packet to an array of bytes for transmission.
- Overrides:
- toBytes in class BattlePacket
fromBytes
protected void fromBytes(byte data[])
- With the given array of bytes, fill this object
with data.
- Parameters:
- data - the data to fill the CountPacket with.
- Overrides:
- fromBytes in class BattlePacket
All Packages Class Hierarchy This Package Previous Next Index