Methods
-
<inner> Deserialize(content) → {T}
-
Deserializes an array of bytes back to an object.
Any array of bytes should lead to either a non
nullvalue or throw.The output must be consistent, an identical output should be returned if called twice on the identical arrays.
Parameters:
Name Type Description contentexternal:ArrayBuffer the array of bytes representing an object. Throws:
-
in case the buffer cannot be read.
- Type
- external:Error
Returns:
the object deserialized from the array of bytes.- Type
- T
-
-
<inner> Serialize(item) → {external:ArrayBuffer}
-
Serializes objects to arrays of bytes.
Any instance of
Tmust be accepted and have a nonnullreturn value: for anyo,o instanceof Timpliesserialize(o) != null.The output must be consistent, an identical output should be returned if called twice on the equal objects.
Parameters:
Name Type Description itemT the item to serialize. Returns:
the serialized item.- Type
- external:ArrayBuffer