org.mule.util
Class SerializationUtils
java.lang.Object
org.apache.commons.lang.SerializationUtils
org.mule.util.SerializationUtils
public class SerializationUtils
- extends SerializationUtils
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializationUtils
public SerializationUtils()
deserialize
public static Object deserialize(InputStream inputStream,
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 nullcl
- classloader which can load custom classes from the stream
- Returns:
- the deserialized object
- Throws:
IllegalArgumentException
- if inputStream
is null
SerializationException
- (runtime) if the serialization fails
deserialize
public static Object deserialize(byte[] objectData,
ClassLoader cl)
Deserializes a single Object
from an array of bytes.
- Parameters:
objectData
- the serialized object, must not be nullcl
- classloader which can load custom classes from the stream
- Returns:
- the deserialized object
- Throws:
IllegalArgumentException
- if objectData
is null
SerializationException
- (runtime) if the serialization fails
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.