T - the type of output objects.public interface Deserializer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(byte[] content)
Deserializes an array of bytes back to an object.
|
T deserialize(byte[] content) throws IllegalArgumentException
Any array of bytes should lead to either a non null value or throw an
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)).
content - the array of bytes representing an object.IllegalArgumentException - if the input array does not denote a valid object.Copyright © 2014. All rights reserved.