Class StatelessContextSerializer

java.lang.Object
com.highdeal.pnr.hci.StatelessContextSerializer

public class StatelessContextSerializer extends Object
This class provides methods for the serialization and unserialization of the StatelessRatingContext and StatelessPreRatingContext.

Objects are serialized (unserialized) to (from) byte arrays. What is done with these byte arrays is the reponsibility of the integration code.

The format of the byte arrays is:

  • array[0]: the version number of the StatelessContextSerializer class used for serialization
  • array[1] to array[8]: checksum of the (uncompressed) byte array representing the serialized object. This checksum is computed using Adler32 class.
  • array[9]: compression flag
  • array[10] array[13]: size of (uncompressed) data
  • array[14] to array[array.lenght-1]: data (eventually compressed)

In case of compressed data, the used algorithm is the ZLIB compression provided by Deflater and Inflater.