cgl.narada.wsinfra.util
Class MarshallingUtils

java.lang.Object
  extended bycgl.narada.wsinfra.util.MarshallingUtils

public class MarshallingUtils
extends Object

A utility class to Marshall and Unmarshall object and object bytes


Field Summary
static MarshallingUtils instance
           
 
Method Summary
static MarshallingUtils getInstance()
           
 byte[] marshall(Object object)
          Marshall an object into a byte stream
 EnvelopeDocument readEnvelopeFromStream(DataInputStream din)
          Reads an envelope document from the underlying stream
 EndpointReferenceType readEprFromStream(DataInputStream din)
          Read an EPR from the underlying datainput stream
 Object readObjectFromStream(DataInputStream din)
          Reads an object that was written using the writeObject(object, DataOutputStream) from a DataInputStream
 String readStringFromStream(DataInputStream din)
          Reads a String from the underlying dataInput Stream
 Object unmarshall(byte[] objectBytes)
          Unmrahsall an object from a byte stream
 void writeEnvelopeToStream(EnvelopeDocument envelopeDocument, DataOutputStream dout)
          Writes an envelope document to the underlying stream
 void writeEprToStream(EndpointReferenceType eprType, DataOutputStream dout)
          Writes an endpoint reference to the underlying stream
 void writeObjectToStream(Object object, DataOutputStream dout)
          Writes an object onto a DataOutputStream
 void writeStringToStream(String toWrite, DataOutputStream dout)
          Writes a String to the underlying stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final MarshallingUtils instance
Method Detail

getInstance

public static MarshallingUtils getInstance()

marshall

public byte[] marshall(Object object)
                throws IOException
Marshall an object into a byte stream

Throws:
IOException

unmarshall

public Object unmarshall(byte[] objectBytes)
                  throws IOException,
                         ClassNotFoundException
Unmrahsall an object from a byte stream

Throws:
IOException
ClassNotFoundException

writeObjectToStream

public void writeObjectToStream(Object object,
                                DataOutputStream dout)
                         throws IOException
Writes an object onto a DataOutputStream

Throws:
IOException

readObjectFromStream

public Object readObjectFromStream(DataInputStream din)
                            throws IOException,
                                   ClassNotFoundException
Reads an object that was written using the writeObject(object, DataOutputStream) from a DataInputStream

Throws:
IOException
ClassNotFoundException

readStringFromStream

public String readStringFromStream(DataInputStream din)
                            throws IOException
Reads a String from the underlying dataInput Stream

Throws:
IOException

writeStringToStream

public void writeStringToStream(String toWrite,
                                DataOutputStream dout)
                         throws IOException
Writes a String to the underlying stream

Throws:
IOException

writeEprToStream

public void writeEprToStream(EndpointReferenceType eprType,
                             DataOutputStream dout)
                      throws IOException
Writes an endpoint reference to the underlying stream

Throws:
IOException

readEprFromStream

public EndpointReferenceType readEprFromStream(DataInputStream din)
                                        throws IOException
Read an EPR from the underlying datainput stream

Throws:
IOException

writeEnvelopeToStream

public void writeEnvelopeToStream(EnvelopeDocument envelopeDocument,
                                  DataOutputStream dout)
                           throws IOException
Writes an envelope document to the underlying stream

Throws:
IOException

readEnvelopeFromStream

public EnvelopeDocument readEnvelopeFromStream(DataInputStream din)
                                        throws IOException
Reads an envelope document from the underlying stream

Throws:
IOException


= END OF BOTTOM NAVBAR ======= -->