E
- type of marshalled objectspublic interface BytesInterop<E> extends BytesWriter<E>
Byteables
, byte[]
arrays, other primitive arrays, "flat" objects
(with primitives fields only), particularly boxed primitive types.
This interface is called "BytesInterop" because it allows to work with object as they
are already marshalled to Bytes
: compare
with other Bytes
, i. e. interoperate objects and Bytes
.
Modifier and Type | Method and Description |
---|---|
long |
hash(E e) |
boolean |
startsWith(Bytes bytes,
E e)
Checks if the given
bytes starts (from the bytes ' position) with the byte sequence the given object
is serialized to, without actual serialization. |
size, write
boolean startsWith(Bytes bytes, E e)
bytes
starts (from the bytes
' position) with the byte sequence the given object
is serialized to, without actual serialization.bytes
- the bytes to check if starts with the serialized form of the given object.
bytes
' is positioned at the first byte to compare. bytes
' limit
is unspecified. bytes
' position and limit shouldn't be altered during
this call.e
- the object to serialize virtually and compare with the given bytes
bytes
starts with the given e
object's serialized formlong hash(E e)
Copyright © 2015. All rights reserved.