org.activemq.util
Class SerializationHelper

java.lang.Object
  extended by org.activemq.util.SerializationHelper

public class SerializationHelper
extends Object

Version:
$Revision: 1.1.1.1 $

Nested Class Summary
static class SerializationHelper.ObjectInputStreamExt
           
 
Constructor Summary
SerializationHelper()
           
 
Method Summary
static Object readObject(byte[] data)
          Read an Object from a byte array
static Object readObject(InputStream in)
          read an object from an InputStream
static byte[] writeObject(Object object)
          Serialize an Object to a ByteArray
static void writeObject(OutputStream out, Object obj)
          Write an Object to an OutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationHelper

public SerializationHelper()
Method Detail

writeObject

public static byte[] writeObject(Object object)
                          throws IOException
Serialize an Object to a ByteArray

Parameters:
object -
Returns:
a byte[] array
Throws:
IOException

readObject

public static Object readObject(byte[] data)
                         throws IOException,
                                ClassNotFoundException
Read an Object from a byte array

Parameters:
data -
Returns:
Throws:
IOException
ClassNotFoundException

readObject

public static Object readObject(InputStream in)
                         throws IOException,
                                ClassNotFoundException
read an object from an InputStream

Parameters:
in -
Returns:
Throws:
IOException
ClassNotFoundException

writeObject

public static void writeObject(OutputStream out,
                               Object obj)
                        throws IOException
Write an Object to an OutputStream

Parameters:
out -
obj -
Throws:
IOException


Copyright © 2004-2010 Protique, Ltd.. All Rights Reserved.