public class TestPacketOne extends AbstractTestPacket implements TestPacketIF
TYPE_ONE, TYPE_TWO
Constructor and Description |
---|
TestPacketOne() |
Modifier and Type | Method and Description |
---|---|
byte |
getByte() |
float |
getFloat() |
short |
getHeader()
Get the header of this packet
|
long |
getLong() |
java.lang.String |
getString() |
boolean |
hasString() |
void |
reconstruct(java.nio.ByteBuffer source)
Reconstruct this PacketIF from the given ByteBuffer
|
void |
setByte(byte value) |
void |
setFloat(float value) |
void |
setLong(long value) |
void |
setString(java.lang.String value) |
java.nio.ByteBuffer |
toBytes()
Get the contents of this PacketIF as a ByteBuffer
|
public short getHeader()
PacketIF
public void reconstruct(java.nio.ByteBuffer source)
PacketIF
reconstruct
in interface PacketIF
source
- The ByteBuffer to reconstruct this PacketIF frompublic java.nio.ByteBuffer toBytes()
PacketIF
public long getLong()
getLong
in interface TestPacketIF
public void setLong(long value)
setLong
in interface TestPacketIF
public byte getByte()
getByte
in interface TestPacketIF
public void setByte(byte value)
setByte
in interface TestPacketIF
public float getFloat()
getFloat
in interface TestPacketIF
public void setFloat(float value)
setFloat
in interface TestPacketIF
public boolean hasString()
hasString
in interface TestPacketIF
public java.lang.String getString()
getString
in interface TestPacketIF
public void setString(java.lang.String value)
setString
in interface TestPacketIF