|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectj_waste.network.Packet
j_waste.network.HeadedPacket
j_waste.network.LocalCapsPacket
This is the class for the Local Caps packet type.
| Field Summary |
| Fields inherited from class j_waste.network.HeadedPacket |
iscomplete, packetData, padBytes |
| Fields inherited from class j_waste.network.Packet |
packet |
| Constructor Summary | |
LocalCapsPacket()
|
|
LocalCapsPacket(byte[] packet)
Constructs a new LocalCapsPacket by parsing the specified byte array; |
|
LocalCapsPacket(byte[] guid,
java.lang.String debug_only)
Debug constructor. |
|
| Method Summary | |
boolean |
addCap(int cap,
int value)
Adds a cap with associated value to this LocalCapsPacket. |
void |
finalizePacket()
Finalizes this packet. |
int |
getCap(int index)
Returns the cap at the specified index. |
int |
getNumCaps()
Returns the number of caps in this packet. |
int |
getValue(int index)
Returns the value of the cap at the specified index. |
byte[] |
toByteArray()
Returns a byte array representation of this packet. |
| Methods inherited from class j_waste.network.HeadedPacket |
createPacket, getData, getGeneralType, getGUID, getHeader, getIntPrio, getIntType, getLength, getMD5, getPrio, getTTL, getType, setLength, setTTL |
| Methods inherited from class j_waste.network.Packet |
padCD, reverseBytes, reverseInt, reverseShort, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LocalCapsPacket()
public LocalCapsPacket(byte[] packet)
throws InvalidPacketException
packet - The byte array to be parsed.
public LocalCapsPacket(byte[] guid,
java.lang.String debug_only)
guid - a GUID.debug_only - String indicating debug.| Method Detail |
public boolean addCap(int cap,
int value)
cap - The type of cap to be added.value - The value of the cap.
public int getNumCaps()
public int getCap(int index)
index - The index of the cap.
public int getValue(int index)
index - The index of the cap associated with the value.
public byte[] toByteArray()
toByteArray in class HeadedPacketpublic void finalizePacket()
finalizePacket in class HeadedPacket
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||