public final Object deserialize ( byte [ ] bytes , ClassLoader loader ) throws ClassNotFoundException , IOException { if ( bytes == null ) return null ; InputStream iin = new InflaterInputStream ( new ByteArrayInputStream ( bytes ) ) ; SerializationService serializationSvc = serializationSvcRef . getService ( ) ; ObjectInputStream oin = loader == null || serializationSvc == null ? new ObjectInputStream ( iin ) : serializationSvc . createObjectInputStream ( iin , loader ) ; try { return oin . readObject ( ) ; } finally { oin . close ( ) ; } }
Utility method that deserializes an object from bytes .