public abstract class TagContextBinarySerializer extends Object
TagContexts with the binary format.
See opencensus-specs for the specification of the cross-language binary serialization format.
| Constructor and Description |
|---|
TagContextBinarySerializer() |
| Modifier and Type | Method and Description |
|---|---|
abstract TagContext |
fromByteArray(byte[] bytes)
Creates a
TagContext from the given on-the-wire encoded representation. |
abstract byte[] |
toByteArray(TagContext tags)
Serializes the
TagContext into the on-the-wire representation. |
public abstract byte[] toByteArray(TagContext tags) throws TagContextSerializationException
TagContext into the on-the-wire representation.
This method should be the inverse of fromByteArray(byte[]).
tags - the TagContext to serialize.TagContext.TagContextSerializationException - if the result would be larger than the maximum allowed
serialized size.public abstract TagContext fromByteArray(byte[] bytes) throws TagContextDeserializationException
TagContext from the given on-the-wire encoded representation.
This method should be the inverse of toByteArray(io.opencensus.tags.TagContext).
bytes - on-the-wire representation of a TagContext.TagContext deserialized from bytes.TagContextDeserializationException - if there is a parse error, the input contains
invalid tags, or the input is larger than the maximum allowed serialized size.