private Object fromBytes(byte[] bytes) throws SerializationException { return SerializationHelper.deserialize( bytes, getReturnedClass().getClassLoader() ); }
private static Object fromBytes(byte[] bytes) throws SerializationException { return SerializationHelper.deserialize( bytes ); }
private static Object fromBytes( byte[] bytes ) throws SerializationException { return SerializationHelper.deserialize(bytes); }
private static Object fromBytes( byte[] bytes ) throws SerializationException { return SerializationHelper.deserialize(bytes); }
/** * <p>Deserializes a single <code>Object</code> from an array of bytes.</p> * * @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 { if (objectData == null) { throw new IllegalArgumentException("The byte[] must not be null"); } ByteArrayInputStream bais = new ByteArrayInputStream(objectData); return deserialize(bais); }
/** * <p>Deserializes a single <code>Object</code> from an array of bytes.</p> * * @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 { if (objectData == null) { throw new IllegalArgumentException("The byte[] must not be null"); } ByteArrayInputStream bais = new ByteArrayInputStream(objectData); return deserialize(bais); }
/** * <p>Deep clone an <code>Object</code> using serialization.</p> * * <p>This is many times slower than writing clone methods by hand * on all objects in your object graph. However, for complex object * graphs, or for those that don't support deep cloning this can * be a simple alternative implementation. Of course all the objects * must be <code>Serializable</code>.</p> * * @param object the <code>Serializable</code> object to clone * @return the cloned object * @throws SerializationException (runtime) if the serialization fails */ public static Object clone(Serializable object) throws SerializationException { log.trace("Starting clone through serialization"); return deserialize( serialize(object) ); }
public Object nullSafeGet( final ResultSet arg0, final String[] arg1, final Object arg2 ) throws HibernateException, SQLException { if ( BlobUserType.debug ) { BlobUserType.log.debug( Messages.getInstance().getString( "BLOBUTYPE.DEBUG_NULL_SAFE_GET" ) ); //$NON-NLS-1$ } InputStream is = arg0.getBinaryStream( arg1[0] ); if ( is != null ) { return SerializationHelper.deserialize( is ); } return null; }
/** * <p>Deep clone an <code>Object</code> using serialization.</p> * * <p>This is many times slower than writing clone methods by hand * on all objects in your object graph. However, for complex object * graphs, or for those that don't support deep cloning this can * be a simple alternative implementation. Of course all the objects * must be <code>Serializable</code>.</p> * * @param object the <code>Serializable</code> object to clone * @return the cloned object * @throws SerializationException (runtime) if the serialization fails */ public static Object clone(Serializable object) throws SerializationException { log.trace("Starting clone through serialization"); return deserialize( serialize(object) ); }
try { log.info( "Mapping cached file: " + lazyfile ); doc = ( org.dom4j.Document ) SerializationHelper.deserialize( new FileInputStream( lazyfile ) );
try { log.info( "Reading mappings from cache file: " + cachedFile ); doc = ( org.dom4j.Document ) SerializationHelper.deserialize( new FileInputStream( cachedFile ) );