megamek.common.net.marshall
Class NativeSerializationMarshaller

java.lang.Object
  extended by megamek.common.net.marshall.PacketMarshaller
      extended by megamek.common.net.marshall.NativeSerializationMarshaller

 class NativeSerializationMarshaller
extends PacketMarshaller

Marshaller that Java native serialization for Packet representation.


Field Summary
 
Fields inherited from class megamek.common.net.marshall.PacketMarshaller
NATIVE_SERIALIZATION_MARSHALING, XML_MARSHALING
 
Constructor Summary
NativeSerializationMarshaller()
           
 
Method Summary
 void marshall(Packet packet, java.io.OutputStream stream)
          Marshalls the packet data into the given OutputStream
 Packet unmarshall(java.io.InputStream stream)
          Unmarshalls the packet data from the given InputStream
 
Methods inherited from class megamek.common.net.marshall.PacketMarshaller
marshall, unmarshall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeSerializationMarshaller

NativeSerializationMarshaller()
Method Detail

marshall

public void marshall(Packet packet,
                     java.io.OutputStream stream)
              throws java.lang.Exception
Description copied from class: PacketMarshaller
Marshalls the packet data into the given OutputStream

Specified by:
marshall in class PacketMarshaller
Parameters:
packet - packet to marshall
stream - OutputStream to marshall the Packet to
Throws:
java.lang.Exception

unmarshall

public Packet unmarshall(java.io.InputStream stream)
                  throws java.lang.Exception
Description copied from class: PacketMarshaller
Unmarshalls the packet data from the given InputStream

Specified by:
unmarshall in class PacketMarshaller
Parameters:
stream - InputStream to unmarshall the packet from
Returns:
the new Packetunmarshalled from the given InputStream
Throws:
java.lang.Exception