|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.petterroea.starterkit.Packet
public class Packet
Basic packet class.
This is used for recieving and sending packets
| Nested Class Summary | |
|---|---|
static class |
Packet.Packettype
Packet types |
| Field Summary | |
|---|---|
private java.lang.String[] |
contents
Contents of the packet |
java.lang.String |
prefix
The prefix |
Packet.Packettype |
type
Type, used for checking |
| Constructor Summary | |
|---|---|
Packet(java.lang.String raw)
Constructor that allows you to enter the raw code. |
|
Packet(java.lang.String[] temp)
Constructor for a packet. |
|
Packet(java.lang.String[] temp,
Packet.Packettype type)
Constructor for a packet. |
|
Packet(java.lang.String raw,
Packet.Packettype type)
Constructor that allows you to enter the raw code. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getEntirePacket()
Get the entire packet data array |
int |
getLength()
Get the length of the packet data array |
java.lang.String |
getPacketDataAt(int index)
Get the packet data at the following index |
java.lang.String |
getRaw()
Get the raw data of this packet |
void |
setPacketDataAt(int index,
java.lang.String data)
Sets packet data at the following index |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String[] contents
public java.lang.String prefix
public Packet.Packettype type
| Constructor Detail |
|---|
public Packet(java.lang.String[] temp,
Packet.Packettype type)
temp - The data in the packettype - The packet type
public Packet(java.lang.String raw,
Packet.Packettype type)
raw - Raw data that is not splittedtype - The packet typepublic Packet(java.lang.String[] temp)
temp - The data in the packetpublic Packet(java.lang.String raw)
raw - Raw data that is not splitted| Method Detail |
|---|
public java.lang.String getRaw()
public java.lang.String[] getEntirePacket()
public java.lang.String getPacketDataAt(int index)
index - The index you want packet data from
public int getLength()
public void setPacketDataAt(int index,
java.lang.String data)
index - The index to set data fromdata - The data to insert into the array at position index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||