|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.net.marshall.PacketMarshaller
public abstract class PacketMarshaller
Generic marshaller that [un]marshalls the Packet
| Field Summary | |
|---|---|
static int |
NATIVE_SERIALIZATION_MARSHALING
Java native serialization marshalling |
static int |
XML_MARSHALING
XML serialization marshalling |
| Constructor Summary | |
|---|---|
PacketMarshaller()
|
|
| Method Summary | |
|---|---|
byte[] |
marshall(Packet packet)
Marshalls the packet data into the byte[] |
abstract void |
marshall(Packet packet,
java.io.OutputStream stream)
Marshalls the packet data into the given OutputStream |
Packet |
unmarshall(byte[] data)
Unmarshalls the packet data from the given byte[] array |
abstract Packet |
unmarshall(java.io.InputStream stream)
Unmarshalls the packet data from the given InputStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NATIVE_SERIALIZATION_MARSHALING
public static final int XML_MARSHALING
| Constructor Detail |
|---|
public PacketMarshaller()
| Method Detail |
|---|
public byte[] marshall(Packet packet)
byte[]
packet - packet to marshall
Packet
public abstract void marshall(Packet packet,
java.io.OutputStream stream)
throws java.lang.Exception
OutputStream
packet - packet to marshallstream - OutputStream to marshall the
Packet to
java.lang.Exceptionpublic Packet unmarshall(byte[] data)
byte[] array
data - byte[] array to unmarshall the packet from
Packetunmarshalled from the given
byte[] array
public abstract Packet unmarshall(java.io.InputStream stream)
throws java.lang.Exception
InputStream
stream - InputStream to unmarshall the packet from
Packetunmarshalled from the given
InputStream
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||