megamek.common.net.marshall
Class XMLMarshaller

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

public class XMLMarshaller
extends PacketMarshaller

Marshaller that uses XML for Packetrepresentation.


Field Summary
 
Fields inherited from class megamek.common.net.marshall.PacketMarshaller
NATIVE_SERIALIZATION_MARSHALING, XML_MARSHALING
 
Constructor Summary
XMLMarshaller()
           
 
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

XMLMarshaller

public XMLMarshaller()
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