Class CodedOutputStream.OutputStreamEncoder
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.CodedOutputStream
-
- io.opentelemetry.exporter.internal.marshal.CodedOutputStream.AbstractBufferedEncoder
-
- io.opentelemetry.exporter.internal.marshal.CodedOutputStream.OutputStreamEncoder
-
- Enclosing class:
- CodedOutputStream
private static final class CodedOutputStream.OutputStreamEncoder extends CodedOutputStream.AbstractBufferedEncoder
AnCodedOutputStream
that decorates anOutputStream
. It performs internal buffering to optimize writes to theOutputStream
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.OutputStream
out
-
Fields inherited from class io.opentelemetry.exporter.internal.marshal.CodedOutputStream.AbstractBufferedEncoder
buffer, limit, position, totalBytesWritten
-
-
Constructor Summary
Constructors Constructor Description OutputStreamEncoder(java.io.OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doFlush()
(package private) void
flush()
Flushes the stream and forces any buffered bytes to be written.private void
flushIfNotAvailable(int requiredSize)
(package private) void
reset(java.io.OutputStream out)
(package private) void
write(byte value)
(package private) void
write(byte[] value, int offset, int length)
(package private) void
write(java.nio.ByteBuffer value)
(package private) void
writeByteArrayNoTag(byte[] value, int offset, int length)
Write abytes
field to the stream.(package private) void
writeByteBufferNoTag(java.nio.ByteBuffer value)
(package private) void
writeFixed32NoTag(int value)
Write afixed32
field to the stream.(package private) void
writeFixed64NoTag(long value)
Write afixed64
field to the stream.(package private) void
writeInt32NoTag(int value)
Write anint32
field to the stream.(package private) void
writeUInt32NoTag(int value)
Write auint32
field to the stream.(package private) void
writeUInt64NoTag(long value)
Write auint64
field to the stream.-
Methods inherited from class io.opentelemetry.exporter.internal.marshal.CodedOutputStream.AbstractBufferedEncoder
buffer, bufferFixed32NoTag, bufferFixed64NoTag, bufferUInt32NoTag, bufferUInt64NoTag
-
Methods inherited from class io.opentelemetry.exporter.internal.marshal.CodedOutputStream
computeBoolSizeNoTag, computeByteArraySizeNoTag, computeByteBufferSizeNoTag, computeDoubleSizeNoTag, computeEnumSizeNoTag, computeFixed32SizeNoTag, computeFixed64SizeNoTag, computeFloatSizeNoTag, computeInt32SizeNoTag, computeInt64SizeNoTag, computeLengthDelimitedFieldSize, computeSFixed32SizeNoTag, computeSFixed64SizeNoTag, computeSInt32SizeNoTag, computeSInt64SizeNoTag, computeTagSize, computeUInt32SizeNoTag, computeUInt64SizeNoTag, encodeZigZag32, encodeZigZag64, newInstance, writeBoolNoTag, writeByteArrayNoTag, writeDoubleNoTag, writeEnumNoTag, writeFloatNoTag, writeInt64NoTag, writeRawBytes, writeSFixed32NoTag, writeSFixed64NoTag, writeSInt32NoTag, writeSInt64NoTag
-
-
-
-
Method Detail
-
reset
void reset(java.io.OutputStream out)
-
writeByteArrayNoTag
void writeByteArrayNoTag(byte[] value, int offset, int length) throws java.io.IOException
Description copied from class:CodedOutputStream
Write abytes
field to the stream.- Specified by:
writeByteArrayNoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
writeByteBufferNoTag
void writeByteBufferNoTag(java.nio.ByteBuffer value) throws java.io.IOException
- Specified by:
writeByteBufferNoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
write
void write(java.nio.ByteBuffer value) throws java.io.IOException
- Throws:
java.io.IOException
-
write
void write(byte value) throws java.io.IOException
- Specified by:
write
in classCodedOutputStream
- Throws:
java.io.IOException
-
writeInt32NoTag
void writeInt32NoTag(int value) throws java.io.IOException
Description copied from class:CodedOutputStream
Write anint32
field to the stream.- Specified by:
writeInt32NoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
writeUInt32NoTag
void writeUInt32NoTag(int value) throws java.io.IOException
Description copied from class:CodedOutputStream
Write auint32
field to the stream.- Specified by:
writeUInt32NoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
writeFixed32NoTag
void writeFixed32NoTag(int value) throws java.io.IOException
Description copied from class:CodedOutputStream
Write afixed32
field to the stream.- Specified by:
writeFixed32NoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
writeUInt64NoTag
void writeUInt64NoTag(long value) throws java.io.IOException
Description copied from class:CodedOutputStream
Write auint64
field to the stream.- Specified by:
writeUInt64NoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
writeFixed64NoTag
void writeFixed64NoTag(long value) throws java.io.IOException
Description copied from class:CodedOutputStream
Write afixed64
field to the stream.- Specified by:
writeFixed64NoTag
in classCodedOutputStream
- Throws:
java.io.IOException
-
flush
void flush() throws java.io.IOException
Description copied from class:CodedOutputStream
Flushes the stream and forces any buffered bytes to be written. This does not flush the underlying OutputStream.- Specified by:
flush
in classCodedOutputStream
- Throws:
java.io.IOException
-
write
void write(byte[] value, int offset, int length) throws java.io.IOException
- Specified by:
write
in classCodedOutputStream
- Throws:
java.io.IOException
-
flushIfNotAvailable
private void flushIfNotAvailable(int requiredSize) throws java.io.IOException
- Throws:
java.io.IOException
-
doFlush
private void doFlush() throws java.io.IOException
- Throws:
java.io.IOException
-
-