org.exolab.jms.net.util
Class SerializationHelper
java.lang.Object
|
+--org.exolab.jms.net.util.SerializationHelper
- public final class SerializationHelper
- extends java.lang.Object
Helper class for serializing and deserializing objects efficiently
- Version:
- $Revision: 1.1 $ $Date: 2004/11/26 01:51:06 $
- Author:
- Tim Anderson
- See Also:
Delegate
Method Summary |
static java.lang.Object |
read(java.lang.Class type,
java.io.ObjectInput in)
Read an object of the specified type from a stream |
static void |
write(java.lang.Class type,
java.lang.Object object,
java.io.ObjectOutput out)
Write an object of the specified type to a stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
write
public static void write(java.lang.Class type,
java.lang.Object object,
java.io.ObjectOutput out)
throws java.io.IOException
- Write an object of the specified type to a stream
- Parameters:
type
- the type of the objectobject
- the object to writeout
- the stream to write to- Throws:
java.io.IOException
- if the object can't be written
read
public static java.lang.Object read(java.lang.Class type,
java.io.ObjectInput in)
throws java.lang.ClassNotFoundException,
java.io.IOException
- Read an object of the specified type from a stream
- Parameters:
type
- the type of the objectin
- the stream to read from- Returns:
- the deserialized object
- Throws:
java.lang.ClassNotFoundException
- if the class for a serialized object
cannot be foundjava.io.IOException
- if the object can't be read
Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.