Class ZipperImpl

java.lang.Object
com.codebarrel.api.ZipperImpl
All Implemented Interfaces:
Zipper

public class ZipperImpl extends Object implements Zipper
  • Constructor Details

    • ZipperImpl

      public ZipperImpl()
  • Method Details

    • zipSerializedJson

      public byte[] zipSerializedJson(Object payload)
      Description copied from interface: Zipper
      Archives an object payload into bytes
      Specified by:
      zipSerializedJson in interface Zipper
      Parameters:
      payload - Object to compress
      Returns:
      zipped representation in bytes
    • unzipDeserializedJson

      public <T> T unzipDeserializedJson(byte[] payload, Class<T> clazz)
      Description copied from interface: Zipper
      Unarchive the given payload with the provided clss
      Specified by:
      unzipDeserializedJson in interface Zipper
      Type Parameters:
      T - Class of the unarchived payload
      Parameters:
      payload - Archived bytes
      clazz - Class to enforce generics
      Returns:
      Unarchived object