|
|||||||||||
| 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.ChatPacket
This is the class for the Chat 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 | |
ChatPacket()
Base constructor, creates an empty ChatPacket. |
|
ChatPacket(byte[] pkg)
Constructs a ChatPacket given a byte array representation of the Packet. |
|
ChatPacket(java.lang.String s,
java.lang.String r,
java.lang.String m)
Constructs a ChatPacket with given sender, recipient and message. |
|
ChatPacket(java.lang.String s,
java.lang.String r,
java.lang.String m,
byte[] guid)
Constructs a ChatPacket with given sender, recipient, message and GUID. |
|
| Method Summary | |
void |
finalizePacket()
Finalizes this ChatPacket. |
java.lang.String |
getMessage()
Returns the message of this ChatPacket. |
java.lang.String |
getRecipient()
Returns the recipient of this ChatPacket. |
java.lang.String |
getSender()
Returns the sender of this ChatPacket. |
void |
setMessage(java.lang.String m)
Sets the message of this ChatPacket. |
void |
setRecipient(java.lang.String r)
Sets the recipient of this ChatPacket. |
void |
setSender(java.lang.String s)
Sets the sender of this ChatPacket. |
byte[] |
toByteArray()
Returns a byte array representation of the 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 ChatPacket()
public ChatPacket(java.lang.String s,
java.lang.String r,
java.lang.String m)
s - the sender.r - the recipient.m - the message.
public ChatPacket(java.lang.String s,
java.lang.String r,
java.lang.String m,
byte[] guid)
s - the sender.r - the recipient.m - the message.guid - the GUID.
public ChatPacket(byte[] pkg)
throws InvalidPacketException
pkg - the Packet.| Method Detail |
public void setSender(java.lang.String s)
s - the sender.public java.lang.String getSender()
public void setRecipient(java.lang.String r)
r - the recipient.public java.lang.String getRecipient()
public void setMessage(java.lang.String m)
m - the message.public java.lang.String getMessage()
public void finalizePacket()
finalizePacket in class HeadedPacketpublic byte[] toByteArray()
toByteArray in class HeadedPacket
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||