/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). * <p/> * Delegates to {@link #doDeserialize} * * @param inputStream the serialized object input stream, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static <T> T deserialize(InputStream inputStream) throws SerializationException { return doDeserialize( inputStream, defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * The stream will be closed once the object is read. This avoids the need * for a finally clause, and maybe also exception handling, in the application * code. * <p/> * The stream passed in is not buffered internally within this method. This is * the responsibility of the caller, if desired. * * @param inputStream the serialized object input stream, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(InputStream inputStream, ClassLoader loader) throws SerializationException { return doDeserialize( inputStream, loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from an array of bytes using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * Delegates to {@link #deserialize(byte[], ClassLoader)} * * @param objectData the serialized object, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData) throws SerializationException { return doDeserialize( wrap( objectData ), defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from an array of bytes. * <p/> * Delegates to {@link #deserialize(java.io.InputStream, ClassLoader)} using a * {@link ByteArrayInputStream} to wrap the array. * * @param objectData the serialized object, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData, ClassLoader loader) throws SerializationException { return doDeserialize( wrap( objectData ), loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). * <p/> * Delegates to {@link #doDeserialize} * * @param inputStream the serialized object input stream, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static <T> T deserialize(InputStream inputStream) throws SerializationException { return doDeserialize( inputStream, defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). * <p/> * Delegates to {@link #doDeserialize} * * @param inputStream the serialized object input stream, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(InputStream inputStream) throws SerializationException { return doDeserialize( inputStream, defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). * <p/> * Delegates to {@link #doDeserialize} * * @param inputStream the serialized object input stream, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(InputStream inputStream) throws SerializationException { return doDeserialize( inputStream, defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * The stream will be closed once the object is read. This avoids the need * for a finally clause, and maybe also exception handling, in the application * code. * <p/> * The stream passed in is not buffered internally within this method. This is * the responsibility of the caller, if desired. * * @param inputStream the serialized object input stream, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(InputStream inputStream, ClassLoader loader) throws SerializationException { return doDeserialize( inputStream, loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * The stream will be closed once the object is read. This avoids the need * for a finally clause, and maybe also exception handling, in the application * code. * <p/> * The stream passed in is not buffered internally within this method. This is * the responsibility of the caller, if desired. * * @param inputStream the serialized object input stream, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(InputStream inputStream, ClassLoader loader) throws SerializationException { return doDeserialize( inputStream, loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from the specified stream using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * The stream will be closed once the object is read. This avoids the need * for a finally clause, and maybe also exception handling, in the application * code. * <p/> * The stream passed in is not buffered internally within this method. This is * the responsibility of the caller, if desired. * * @param inputStream the serialized object input stream, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>inputStream</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(InputStream inputStream, ClassLoader loader) throws SerializationException { return doDeserialize( inputStream, loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from an array of bytes. * <p/> * Delegates to {@link #deserialize(java.io.InputStream, ClassLoader)} using a * {@link ByteArrayInputStream} to wrap the array. * * @param objectData the serialized object, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData, ClassLoader loader) throws SerializationException { return doDeserialize( wrap( objectData ), loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from an array of bytes using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * Delegates to {@link #deserialize(byte[], ClassLoader)} * * @param objectData the serialized object, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData) throws SerializationException { return doDeserialize( wrap( objectData ), defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from an array of bytes. * <p/> * Delegates to {@link #deserialize(java.io.InputStream, ClassLoader)} using a * {@link ByteArrayInputStream} to wrap the array. * * @param objectData the serialized object, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData, ClassLoader loader) throws SerializationException { return doDeserialize( wrap( objectData ), loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from an array of bytes. * <p/> * Delegates to {@link #deserialize(java.io.InputStream, ClassLoader)} using a * {@link ByteArrayInputStream} to wrap the array. * * @param objectData the serialized object, must not be null * @param loader The classloader to use * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData, ClassLoader loader) throws SerializationException { return doDeserialize( wrap( objectData ), loader, defaultClassLoader(), hibernateClassLoader() ); }
/** * Deserializes an object from an array of bytes using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * Delegates to {@link #deserialize(byte[], ClassLoader)} * * @param objectData the serialized object, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData) throws SerializationException { return doDeserialize( wrap( objectData ), defaultClassLoader(), hibernateClassLoader(), null ); }
/** * Deserializes an object from an array of bytes using the Thread Context * ClassLoader (TCCL). If there is no TCCL set, the classloader of the calling * class is used. * <p/> * Delegates to {@link #deserialize(byte[], ClassLoader)} * * @param objectData the serialized object, must not be null * * @return the deserialized object * * @throws IllegalArgumentException if <code>objectData</code> is <code>null</code> * @throws SerializationException (runtime) if the serialization fails */ public static Object deserialize(byte[] objectData) throws SerializationException { return doDeserialize( wrap( objectData ), defaultClassLoader(), hibernateClassLoader(), null ); }