net.anotheria.net.util
Class ByteArraySerializer

java.lang.Object
  extended by net.anotheria.net.util.ByteArraySerializer

public final class ByteArraySerializer
extends Object

This utility serializes a class to a byte array.

Author:
lrosenberg Created on 09.09.2004

Method Summary
static Object deserializeObject(byte[] array)
          Desirializes a previously serialized from a byte array.
static byte[] serializeObject(Serializable obj)
          Serializes a serializeable object into a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

serializeObject

public static byte[] serializeObject(Serializable obj)
                              throws IOException
Serializes a serializeable object into a byte array.

Parameters:
obj - the object to serialize
Returns:
Throws:
IOException

deserializeObject

public static Object deserializeObject(byte[] array)
                                throws IOException
Desirializes a previously serialized from a byte array. The object has to be of serializeable class.

Parameters:
array - the byte array with the contents of the object.
Throws:
IOException


Copyright © 2010-2013 anotheria.net. All Rights Reserved.