com.mchange.v2.ser
Class SerializableUtils

java.lang.Object
  extended by com.mchange.v2.ser.SerializableUtils

public final class SerializableUtils
extends java.lang.Object


Method Summary
static java.lang.Object deepCopy(java.lang.Object o)
           
static java.lang.Object deserializeFromByteArray(byte[] bytes)
          Deprecated. use SerialializableUtils.fromByteArray() [shorter name is better!]
static java.lang.Object fromByteArray(byte[] bytes)
          By default, unwraps IndirectlySerialized objects, returning the original
static java.lang.Object fromByteArray(byte[] bytes, boolean ignore_indirects)
           
static void marshallObjectToFile(java.lang.Object o, java.io.File file)
           
static byte[] serializeToByteArray(java.lang.Object obj)
          Deprecated. use SerialializableUtils.toByteArray() [shorter name is better!]
static java.lang.Object testSerializeDeserialize(java.lang.Object o)
           
static byte[] toByteArray(java.lang.Object obj)
           
static byte[] toByteArray(java.lang.Object obj, Indirector indirector, IndirectPolicy policy)
           
static java.lang.Object unmarshallObjectFromFile(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toByteArray

public static byte[] toByteArray(java.lang.Object obj)
                          throws java.io.NotSerializableException
Throws:
java.io.NotSerializableException

toByteArray

public static byte[] toByteArray(java.lang.Object obj,
                                 Indirector indirector,
                                 IndirectPolicy policy)
                          throws java.io.NotSerializableException
Throws:
java.io.NotSerializableException

serializeToByteArray

public static byte[] serializeToByteArray(java.lang.Object obj)
                                   throws java.io.NotSerializableException
Deprecated. use SerialializableUtils.toByteArray() [shorter name is better!]

Throws:
java.io.NotSerializableException

fromByteArray

public static java.lang.Object fromByteArray(byte[] bytes)
                                      throws java.io.IOException,
                                             java.lang.ClassNotFoundException
By default, unwraps IndirectlySerialized objects, returning the original

Throws:
java.io.IOException
java.lang.ClassNotFoundException

fromByteArray

public static java.lang.Object fromByteArray(byte[] bytes,
                                             boolean ignore_indirects)
                                      throws java.io.IOException,
                                             java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

deserializeFromByteArray

public static java.lang.Object deserializeFromByteArray(byte[] bytes)
                                                 throws java.io.IOException,
                                                        java.lang.ClassNotFoundException
Deprecated. use SerialializableUtils.fromByteArray() [shorter name is better!]

Throws:
java.io.IOException
java.lang.ClassNotFoundException

testSerializeDeserialize

public static java.lang.Object testSerializeDeserialize(java.lang.Object o)
                                                 throws java.io.IOException,
                                                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

deepCopy

public static java.lang.Object deepCopy(java.lang.Object o)
                                 throws java.io.IOException,
                                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

unmarshallObjectFromFile

public static final java.lang.Object unmarshallObjectFromFile(java.io.File file)
                                                       throws java.io.IOException,
                                                              java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

marshallObjectToFile

public static final void marshallObjectToFile(java.lang.Object o,
                                              java.io.File file)
                                       throws java.io.IOException
Throws:
java.io.IOException