Package io.zenoh.bytes
Class ZBytes
-
- All Implemented Interfaces:
-
io.zenoh.bytes.IntoZBytes
public final class ZBytes implements IntoZBytes
ZBytes contains the serialized bytes of user data.
It provides convenient methods to the user for serialization/deserialization.
NOTE
Zenoh semantic and protocol take care of sending and receiving bytes without restricting the actual data types. Default (de)serializers are provided for convenience to the users to deal with primitives data types via a simple out-of-the-box encoding. They are NOT by any means the only (de)serializers users can use nor a limitation to the types supported by Zenoh. Users are free and encouraged to use any data format of their choice like JSON, protobuf, flatbuffers, etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
ZBytes.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static ZBytes.Companion
Companion
-
Method Summary
Modifier and Type Method Description final ByteArray
toBytes()
Returns the internal byte representation of the ZBytes. final String
tryToString()
Attempts to decode the ZBytes into a string with UTF-8 encoding. String
toString()
ZBytes
into()
Boolean
equals(Object other)
<Error class: unknown class>
hashCode()
-
-
Method Detail
-
tryToString
final String tryToString()
Attempts to decode the ZBytes into a string with UTF-8 encoding.
-
hashCode
<Error class: unknown class> hashCode()
-
-
-
-