Interface Binary
- All Superinterfaces:
Bytes
A read-only binary value with support for binary deltas.
Values are effectively immutable. Instances can be backed by
user-supplied byte arrays. Once a Binary has been constructed around an
array, care must be taken not to modify the data in the array because doing
so would violate immutability.
- Since:
- 5.7
- Author:
- DiffusionData Limited
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionapply(BinaryDelta delta) Apply a binary delta to this value to create a new value.Compare this value with an earlier version to calculate a binary delta.Methods inherited from interface com.pushtechnology.diffusion.datatype.Bytes
asInputStream, copyTo, length, toByteArray
-
Method Details
-
apply
Apply a binary delta to this value to create a new value.Convenient equivalent to
Diffusion.dataTypes().binary().binaryDeltaType().apply(this, delta).- Throws:
InvalidDataException- if the delta is invalid
-
diff
Compare this value with an earlier version to calculate a binary delta.Convenient equivalent to
Diffusion.dataTypes().binary().binaryDeltaType().diff(original, this).- Parameters:
original- the original Binary value to compare with this value- Returns:
- a binary delta representing the difference between original and this Binary
-