All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.mais_h.mathsync.serialize.Deserializer Maven / Gradle / Ivy

package eu.mais_h.mathsync.serialize;

/**
 * Deserializes arrays of bytes back to objects.
 *
 * @param  the type of output objects.
 */
public interface Deserializer {

  /**
   * Deserializes an array of bytes back to an object.
   *
   * 

Any array of bytes should lead to either a non null value or throw an * {@link IllegalArgumentException}.

* *

The output must be consistent, an identical output should be returned if called twice * on the identical arrays: for any valid a1 and a2, * Arrays.equals(a1, a2) implies * deserialize(a1).equals(deserialize(a2)).

* * @param content the array of bytes representing an object. * @return the object deserialized from the array of bytes. * @throws IllegalArgumentException if the input array does not denote a valid object. */ T deserialize(byte[] content) throws IllegalArgumentException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy