Package com.codebarrel.api
Class ZipperImpl
java.lang.Object
com.codebarrel.api.ZipperImpl
- All Implemented Interfaces:
Zipper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TunzipDeserializedJson(byte[] payload, Class<T> clazz) Unarchive the given payload with the provided clssbyte[]zipSerializedJson(Object payload) Archives an object payload into bytes
-
Constructor Details
-
ZipperImpl
public ZipperImpl()
-
-
Method Details
-
zipSerializedJson
Description copied from interface:ZipperArchives an object payload into bytes- Specified by:
zipSerializedJsonin interfaceZipper- Parameters:
payload- Object to compress- Returns:
- zipped representation in bytes
-
unzipDeserializedJson
Description copied from interface:ZipperUnarchive the given payload with the provided clss- Specified by:
unzipDeserializedJsonin interfaceZipper- Type Parameters:
T- Class of the unarchived payload- Parameters:
payload- Archived bytesclazz- Class to enforce generics- Returns:
- Unarchived object
-