Class AbstractBinarySerializer<T>

    • Constructor Detail

      • AbstractBinarySerializer

        public AbstractBinarySerializer()
    • Method Detail

      • serialize

        @Nonnull
        public byte[] serialize​(T t)
                         throws IOException
        Description copied from interface: Serializer
        Write an object of type T into its basic representation.
        Specified by:
        serialize in interface Serializer<T,​byte[]>
        Parameters:
        t - the object to serialize
        Returns:
        the serialized object
        Throws:
        IOException - if an I/O error occurs during the serialization
      • deserialize

        @Nonnull
        public T deserialize​(byte[] data)
                      throws IOException
        Description copied from interface: Serializer
        Reads and assembles an object of type T from the given data.
        Specified by:
        deserialize in interface Serializer<T,​byte[]>
        Parameters:
        data - the basic representation of the object
        Returns:
        the deserialized object
        Throws:
        IOException - if an I/O error occurs during the deserialization