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.


Constructor Index

 o CountPacket()
construct a CountPacket with a value of 0.
 o CountPacket(int)
construct a CountPacket with a particular value.

Method Index

 o asciiDump()
Dump a text version of this packet, for debugging.
 o fromBytes(byte[])
With the given array of bytes, fill this object with data.
 o getCount()
Return the count
 o toBytes()
Convert this packet to an array of bytes for transmission.
 o toString()
convert to a string representation

Constructors

 o CountPacket
  public CountPacket()
construct a CountPacket with a value of 0. Used before reading in an actual CountPacket from a stream.
 o 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

Methods

 o toString
  public String toString()
convert to a string representation
Overrides:
toString in class Object
 o asciiDump
  public void asciiDump()
Dump a text version of this packet, for debugging.
 o getCount
  public final int getCount()
Return the count
 o toBytes
  protected byte[] toBytes()
Convert this packet to an array of bytes for transmission.
Overrides:
toBytes in class BattlePacket
 o 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