net.sf.robocode.serialization
Class RbSerializer
java.lang.Object
net.sf.robocode.serialization.RbSerializer
public final class RbSerializer
- extends java.lang.Object
|
Method Summary |
static java.lang.Object |
deepCopy(byte type,
java.lang.Object src)
|
java.lang.Object |
deserialize(java.nio.ByteBuffer buffer)
|
java.lang.Object |
deserialize(java.io.InputStream source)
|
java.lang.Object |
deserializeAny(java.nio.ByteBuffer buffer)
|
boolean |
deserializeBoolean(java.nio.ByteBuffer buffer)
|
byte[] |
deserializeBytes(java.nio.ByteBuffer buffer)
|
char |
deserializeChar(java.nio.ByteBuffer buffer)
|
char[] |
deserializeChars(java.nio.ByteBuffer buffer)
|
double |
deserializeDouble(java.nio.ByteBuffer buffer)
|
double[] |
deserializeDoubles(java.nio.ByteBuffer buffer)
|
java.lang.Float |
deserializeFloat(java.nio.ByteBuffer buffer)
|
float[] |
deserializeFloats(java.nio.ByteBuffer buffer)
|
static java.lang.Object |
deserializeFromBuffer(java.nio.ByteBuffer buffer)
|
int |
deserializeInt(java.nio.ByteBuffer buffer)
|
int[] |
deserializeIntegers(java.nio.ByteBuffer buffer)
|
java.lang.String |
deserializeString(java.nio.ByteBuffer buffer)
|
static void |
register(java.lang.Class realClass,
byte type)
|
void |
serialize(java.nio.ByteBuffer buffer,
boolean value)
|
void |
serialize(java.nio.ByteBuffer buffer,
byte[] data)
|
void |
serialize(java.nio.ByteBuffer buffer,
byte type,
java.lang.Object object)
|
void |
serialize(java.nio.ByteBuffer buffer,
char value)
|
void |
serialize(java.nio.ByteBuffer buffer,
char[] data)
|
void |
serialize(java.nio.ByteBuffer buffer,
double value)
|
void |
serialize(java.nio.ByteBuffer buffer,
double[] data)
|
void |
serialize(java.nio.ByteBuffer buffer,
Event event)
|
void |
serialize(java.nio.ByteBuffer buffer,
float[] data)
|
void |
serialize(java.nio.ByteBuffer buffer,
int value)
|
void |
serialize(java.nio.ByteBuffer buffer,
int[] data)
|
void |
serialize(java.nio.ByteBuffer buffer,
long value)
|
void |
serialize(java.nio.ByteBuffer buffer,
java.lang.String data)
|
java.nio.ByteBuffer |
serialize(byte type,
java.lang.Object object)
|
void |
serialize(java.io.OutputStream target,
byte type,
java.lang.Object object)
|
static java.nio.ByteBuffer |
serializeToBuffer(java.lang.Object src)
|
int |
sizeOf(byte[] data)
|
int |
sizeOf(byte type,
java.lang.Object object)
|
int |
sizeOf(Event event)
|
int |
sizeOf(java.lang.String data)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIZEOF_TYPEINFO
public static final int SIZEOF_TYPEINFO
- See Also:
- Constant Field Values
SIZEOF_BYTE
public static final int SIZEOF_BYTE
- See Also:
- Constant Field Values
SIZEOF_BOOL
public static final int SIZEOF_BOOL
- See Also:
- Constant Field Values
SIZEOF_CHAR
public static final int SIZEOF_CHAR
- See Also:
- Constant Field Values
SIZEOF_INT
public static final int SIZEOF_INT
- See Also:
- Constant Field Values
SIZEOF_LONG
public static final int SIZEOF_LONG
- See Also:
- Constant Field Values
SIZEOF_DOUBLE
public static final int SIZEOF_DOUBLE
- See Also:
- Constant Field Values
TERMINATOR_TYPE
public static final byte TERMINATOR_TYPE
- See Also:
- Constant Field Values
ExecCommands_TYPE
public static final byte ExecCommands_TYPE
- See Also:
- Constant Field Values
BulletCommand_TYPE
public static final byte BulletCommand_TYPE
- See Also:
- Constant Field Values
TeamMessage_TYPE
public static final byte TeamMessage_TYPE
- See Also:
- Constant Field Values
DebugProperty_TYPE
public static final byte DebugProperty_TYPE
- See Also:
- Constant Field Values
ExecResults_TYPE
public static final byte ExecResults_TYPE
- See Also:
- Constant Field Values
RobotStatus_TYPE
public static final byte RobotStatus_TYPE
- See Also:
- Constant Field Values
BulletStatus_TYPE
public static final byte BulletStatus_TYPE
- See Also:
- Constant Field Values
BattleResults_TYPE
public static final byte BattleResults_TYPE
- See Also:
- Constant Field Values
Bullet_TYPE
public static final byte Bullet_TYPE
- See Also:
- Constant Field Values
BattleEndedEvent_TYPE
public static final byte BattleEndedEvent_TYPE
- See Also:
- Constant Field Values
BulletHitBulletEvent_TYPE
public static final byte BulletHitBulletEvent_TYPE
- See Also:
- Constant Field Values
BulletHitEvent_TYPE
public static final byte BulletHitEvent_TYPE
- See Also:
- Constant Field Values
BulletMissedEvent_TYPE
public static final byte BulletMissedEvent_TYPE
- See Also:
- Constant Field Values
DeathEvent_TYPE
public static final byte DeathEvent_TYPE
- See Also:
- Constant Field Values
WinEvent_TYPE
public static final byte WinEvent_TYPE
- See Also:
- Constant Field Values
HitWallEvent_TYPE
public static final byte HitWallEvent_TYPE
- See Also:
- Constant Field Values
RobotDeathEvent_TYPE
public static final byte RobotDeathEvent_TYPE
- See Also:
- Constant Field Values
SkippedTurnEvent_TYPE
public static final byte SkippedTurnEvent_TYPE
- See Also:
- Constant Field Values
ScannedRobotEvent_TYPE
public static final byte ScannedRobotEvent_TYPE
- See Also:
- Constant Field Values
HitByBulletEvent_TYPE
public static final byte HitByBulletEvent_TYPE
- See Also:
- Constant Field Values
HitRobotEvent_TYPE
public static final byte HitRobotEvent_TYPE
- See Also:
- Constant Field Values
KeyPressedEvent_TYPE
public static final byte KeyPressedEvent_TYPE
- See Also:
- Constant Field Values
KeyReleasedEvent_TYPE
public static final byte KeyReleasedEvent_TYPE
- See Also:
- Constant Field Values
KeyTypedEvent_TYPE
public static final byte KeyTypedEvent_TYPE
- See Also:
- Constant Field Values
MouseClickedEvent_TYPE
public static final byte MouseClickedEvent_TYPE
- See Also:
- Constant Field Values
MouseDraggedEvent_TYPE
public static final byte MouseDraggedEvent_TYPE
- See Also:
- Constant Field Values
MouseEnteredEvent_TYPE
public static final byte MouseEnteredEvent_TYPE
- See Also:
- Constant Field Values
MouseExitedEvent_TYPE
public static final byte MouseExitedEvent_TYPE
- See Also:
- Constant Field Values
MouseMovedEvent_TYPE
public static final byte MouseMovedEvent_TYPE
- See Also:
- Constant Field Values
MousePressedEvent_TYPE
public static final byte MousePressedEvent_TYPE
- See Also:
- Constant Field Values
MouseReleasedEvent_TYPE
public static final byte MouseReleasedEvent_TYPE
- See Also:
- Constant Field Values
MouseWheelMovedEvent_TYPE
public static final byte MouseWheelMovedEvent_TYPE
- See Also:
- Constant Field Values
RbSerializer
public RbSerializer()
serialize
public void serialize(java.io.OutputStream target,
byte type,
java.lang.Object object)
throws java.io.IOException
- Throws:
java.io.IOException
serialize
public java.nio.ByteBuffer serialize(byte type,
java.lang.Object object)
throws java.io.IOException
- Throws:
java.io.IOException
deserialize
public java.lang.Object deserialize(java.io.InputStream source)
throws java.io.IOException
- Throws:
java.io.IOException
deserialize
public java.lang.Object deserialize(java.nio.ByteBuffer buffer)
throws java.io.IOException
- Throws:
java.io.IOException
serialize
public void serialize(java.nio.ByteBuffer buffer,
byte type,
java.lang.Object object)
serialize
public void serialize(java.nio.ByteBuffer buffer,
java.lang.String data)
serialize
public void serialize(java.nio.ByteBuffer buffer,
byte[] data)
serialize
public void serialize(java.nio.ByteBuffer buffer,
int[] data)
serialize
public void serialize(java.nio.ByteBuffer buffer,
char[] data)
serialize
public void serialize(java.nio.ByteBuffer buffer,
double[] data)
serialize
public void serialize(java.nio.ByteBuffer buffer,
float[] data)
serialize
public void serialize(java.nio.ByteBuffer buffer,
boolean value)
serialize
public void serialize(java.nio.ByteBuffer buffer,
double value)
serialize
public void serialize(java.nio.ByteBuffer buffer,
char value)
serialize
public void serialize(java.nio.ByteBuffer buffer,
long value)
serialize
public void serialize(java.nio.ByteBuffer buffer,
int value)
serialize
public void serialize(java.nio.ByteBuffer buffer,
Event event)
deserializeAny
public java.lang.Object deserializeAny(java.nio.ByteBuffer buffer)
deserializeString
public java.lang.String deserializeString(java.nio.ByteBuffer buffer)
deserializeBytes
public byte[] deserializeBytes(java.nio.ByteBuffer buffer)
deserializeIntegers
public int[] deserializeIntegers(java.nio.ByteBuffer buffer)
deserializeFloats
public float[] deserializeFloats(java.nio.ByteBuffer buffer)
deserializeChars
public char[] deserializeChars(java.nio.ByteBuffer buffer)
deserializeDoubles
public double[] deserializeDoubles(java.nio.ByteBuffer buffer)
deserializeBoolean
public boolean deserializeBoolean(java.nio.ByteBuffer buffer)
deserializeChar
public char deserializeChar(java.nio.ByteBuffer buffer)
deserializeInt
public int deserializeInt(java.nio.ByteBuffer buffer)
deserializeFloat
public java.lang.Float deserializeFloat(java.nio.ByteBuffer buffer)
deserializeDouble
public double deserializeDouble(java.nio.ByteBuffer buffer)
sizeOf
public int sizeOf(java.lang.String data)
sizeOf
public int sizeOf(byte[] data)
sizeOf
public int sizeOf(byte type,
java.lang.Object object)
sizeOf
public int sizeOf(Event event)
register
public static void register(java.lang.Class realClass,
byte type)
serializeToBuffer
public static java.nio.ByteBuffer serializeToBuffer(java.lang.Object src)
throws java.io.IOException
- Throws:
java.io.IOException
deserializeFromBuffer
public static java.lang.Object deserializeFromBuffer(java.nio.ByteBuffer buffer)
throws java.io.IOException
- Throws:
java.io.IOException
deepCopy
public static java.lang.Object deepCopy(byte type,
java.lang.Object src)