Class CodedInputStream
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.CodedInputStream
-
public final class CodedInputStream extends java.lang.Object
Minimal copy of protobuf-java's CodedInputStream, currently only used in GrpcStatusUtil.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CodedInputStream(byte[] buffer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isAtEnd()
static CodedInputStream
newInstance(byte[] serialized)
Returns a newCodedInputStream
.private static java.io.IOException
newMalformedVarintException()
private static java.io.IOException
newNegativeException()
private static java.io.IOException
newTruncatedException()
double
readDouble()
private byte
readRawByte()
private long
readRawLittleEndian64()
int
readRawVarint32()
Read varint32.private long
readRawVarint64SlowPath()
java.lang.String
readStringRequireUtf8()
Reads a string field.int
readTag()
Reads the next tag.boolean
skipField(int tag)
Skips a field.private void
skipRawBytes(int length)
private void
skipRawVarint()
private void
skipRawVarintFastPath()
private void
skipRawVarintSlowPath()
-
-
-
Method Detail
-
newInstance
public static CodedInputStream newInstance(byte[] serialized)
Returns a newCodedInputStream
.
-
readTag
public int readTag() throws java.io.IOException
Reads the next tag.- Throws:
java.io.IOException
-
readStringRequireUtf8
public java.lang.String readStringRequireUtf8() throws java.io.IOException
Reads a string field.- Throws:
java.io.IOException
-
skipField
public boolean skipField(int tag) throws java.io.IOException
Skips a field.- Throws:
java.io.IOException
-
isAtEnd
private boolean isAtEnd()
-
readRawVarint32
public int readRawVarint32() throws java.io.IOException
Read varint32.- Throws:
java.io.IOException
-
readRawVarint64SlowPath
private long readRawVarint64SlowPath() throws java.io.IOException
- Throws:
java.io.IOException
-
readRawByte
private byte readRawByte() throws java.io.IOException
- Throws:
java.io.IOException
-
skipRawVarint
private void skipRawVarint() throws java.io.IOException
- Throws:
java.io.IOException
-
readDouble
public double readDouble() throws java.io.IOException
- Throws:
java.io.IOException
-
readRawLittleEndian64
private long readRawLittleEndian64() throws java.io.IOException
- Throws:
java.io.IOException
-
skipRawVarintFastPath
private void skipRawVarintFastPath() throws java.io.IOException
- Throws:
java.io.IOException
-
skipRawVarintSlowPath
private void skipRawVarintSlowPath() throws java.io.IOException
- Throws:
java.io.IOException
-
skipRawBytes
private void skipRawBytes(int length) throws java.io.IOException
- Throws:
java.io.IOException
-
newNegativeException
private static java.io.IOException newNegativeException()
-
newTruncatedException
private static java.io.IOException newTruncatedException()
-
newMalformedVarintException
private static java.io.IOException newMalformedVarintException()
-
-