/** * Uses default de-serialization to turn a byte array into an object. Decompresses the value * first. All exceptions are converted into IOExceptions. * <p> * @param data bytes of data * @return Object * @throws IOException on i/o problem * @throws ClassNotFoundException if class is not found during deserialization */ @Override public <T> T deSerialize( byte[] data, ClassLoader loader ) throws IOException, ClassNotFoundException { if ( data == null ) { return null; } byte[] decompressedByteArray = CompressionUtil.decompressByteArray( data ); return deserializeObject( decompressedByteArray ); }
/** * Uses default de-serialization to turn a byte array into an object. Decompresses the value * first. All exceptions are converted into IOExceptions. * <p> * @param data bytes of data * @return Object * @throws IOException on i/o problem * @throws ClassNotFoundException if class is not found during deserialization */ @Override public <T> T deSerialize( byte[] data, ClassLoader loader ) throws IOException, ClassNotFoundException { if ( data == null ) { return null; } byte[] decompressedByteArray = CompressionUtil.decompressByteArray( data ); return deserializeObject( decompressedByteArray ); }