Class Marshaler
java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
- Direct Known Subclasses:
LowAllocationLogsRequestMarshaler
,LowAllocationMetricsRequestMarshaler
,LowAllocationTraceRequestMarshaler
,MarshalerWithSize
Marshaler from an SDK structure to protobuf wire format.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Returns the number of bytes this Marshaler will write in proto binary format.final void
writeBinaryTo
(OutputStream output) Marshals into theOutputStream
in proto binary format.final void
writeJsonTo
(com.fasterxml.jackson.core.JsonGenerator output) Marshals into theJsonGenerator
in proto JSON format.final void
writeJsonTo
(OutputStream output) Marshals into theOutputStream
in proto JSON format.final void
writeJsonWithNewline
(com.fasterxml.jackson.core.JsonGenerator output) Marshals into theJsonGenerator
in proto JSON format and adds a newline.protected abstract void
writeTo
(Serializer output)
-
Constructor Details
-
Marshaler
public Marshaler()
-
-
Method Details
-
writeBinaryTo
Marshals into theOutputStream
in proto binary format.- Throws:
IOException
-
writeJsonTo
Marshals into theOutputStream
in proto JSON format.- Throws:
IOException
-
writeJsonTo
Marshals into theJsonGenerator
in proto JSON format.- Throws:
IOException
-
writeJsonWithNewline
public final void writeJsonWithNewline(com.fasterxml.jackson.core.JsonGenerator output) throws IOException Marshals into theJsonGenerator
in proto JSON format and adds a newline.- Throws:
IOException
-
getBinarySerializedSize
public abstract int getBinarySerializedSize()Returns the number of bytes this Marshaler will write in proto binary format. -
writeTo
- Throws:
IOException
-