org.mule.util
Class SerializationUtils

java.lang.Object
  extended by org.apache.commons.lang.SerializationUtils
      extended by org.mule.util.SerializationUtils

public class SerializationUtils
extends SerializationUtils


Constructor Summary
SerializationUtils()
           
 
Method Summary
static java.lang.Object deserialize(byte[] objectData, java.lang.ClassLoader cl)
          Deserializes a single Object from an array of bytes.
static java.lang.Object deserialize(java.io.InputStream inputStream, java.lang.ClassLoader cl)
          Deserializes an Object from the specified stream.
 
Methods inherited from class org.apache.commons.lang.SerializationUtils
clone, deserialize, deserialize, serialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationUtils

public SerializationUtils()
Method Detail

deserialize

public static java.lang.Object deserialize(java.io.InputStream inputStream,
                                           java.lang.ClassLoader cl)

Deserializes an Object from the specified stream.

The stream will be closed once the object is written. This avoids the need for a finally clause, and maybe also exception handling, in the application code.

The stream passed in is not buffered internally within this method. This is the responsibility of your application if desired.

Parameters:
inputStream - the serialized object input stream, must not be null
cl - classloader which can load custom classes from the stream
Returns:
the deserialized object
Throws:
java.lang.IllegalArgumentException - if inputStream is null
SerializationException - (runtime) if the serialization fails

deserialize

public static java.lang.Object deserialize(byte[] objectData,
                                           java.lang.ClassLoader cl)

Deserializes a single Object from an array of bytes.

Parameters:
objectData - the serialized object, must not be null
cl - classloader which can load custom classes from the stream
Returns:
the deserialized object
Throws:
java.lang.IllegalArgumentException - if objectData is null
SerializationException - (runtime) if the serialization fails


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.