Class LZ4Serialization

All Implemented Interfaces:
JPPFSerialization

public class LZ4Serialization extends JPPFCompositeSerialization
A composite serialization scheme which applies a LZ4 compression/decompression to a concrete JPPFSerialization implementation.

See also: LZ4 home.

Author:
Laurent Cohen
  • Constructor Details

    • LZ4Serialization

      public LZ4Serialization()
  • Method Details

    • serialize

      public void serialize(Object o, OutputStream os) throws Exception
      Description copied from interface: JPPFSerialization
      Serialize an object into the specified output stream.
      Parameters:
      o - the object to serialize.
      os - the stream that receives the serialized object.
      Throws:
      Exception - if any error occurs.
    • deserialize

      public Object deserialize(InputStream is) throws Exception
      Description copied from interface: JPPFSerialization
      Deserialize an object from the specified input stream.
      Parameters:
      is - the stream from which to deserialize.
      Returns:
      the serialized object.
      Throws:
      Exception - if any error occurs.
    • getName

      public String getName()
      Description copied from class: JPPFCompositeSerialization
      Get the name given to this composite serialization. The name is case-insensitive and must be unique among all defined composite serializations, otherwise it will either override, or be overriden by, a serialization with the same name.
      Specified by:
      getName in class JPPFCompositeSerialization
      Returns:
      the name of this composite serialization.