public class ByteBufCodedInputStream extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ByteBufCodedInputStream.ByteBufMessageBuilder |
| Modifier and Type | Method and Description |
|---|---|
void |
checkLastTagWas(int value)
Verifies that the last call to readTag() returned the given tag value.
|
static ByteBufCodedInputStream |
get(io.netty.buffer.ByteBuf buf) |
int |
getBytesUntilLimit() |
boolean |
isAtEnd() |
void |
popLimit(int oldLimit)
Discards the current limit, returning to the previous limit.
|
int |
pushLimit(int byteLimit) |
boolean |
readBool()
Read a
bool field value from the stream. |
org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString |
readBytes()
Read a
bytes field value from the stream. |
double |
readDouble()
Read a
double field value from the stream. |
int |
readEnum()
Read an enum field value from the stream.
|
int |
readFixed32()
Read a
fixed32 field value from the stream. |
long |
readFixed64()
Read a
fixed64 field value from the stream. |
float |
readFloat()
Read a
float field value from the stream. |
int |
readInt32()
Read an
int32 field value from the stream. |
long |
readInt64()
Read an
int64 field value from the stream. |
void |
readMessage(ByteBufCodedInputStream.ByteBufMessageBuilder builder,
org.apache.pulsar.shaded.com.google.protobuf.v241.ExtensionRegistryLite extensionRegistry)
Read an embedded message field value from the stream.
|
int |
readRawLittleEndian32()
Read a 32-bit little-endian integer from the stream.
|
long |
readRawLittleEndian64()
Read a 64-bit little-endian integer from the stream.
|
int |
readRawVarint32()
Read a raw Varint from the stream.
|
long |
readRawVarint64()
Read a raw Varint from the stream.
|
long |
readSFixed64() |
int |
readTag() |
int |
readUInt32()
Read a
uint32 field value from the stream. |
long |
readUInt64()
Read a
uint64 field value from the stream. |
void |
recycle() |
boolean |
skipField(int tag)
Reads and discards a single field, given its tag value.
|
void |
skipMessage()
Reads and discards an entire message.
|
void |
skipRawBytes(int size)
Reads and discards
size bytes. |
public static ByteBufCodedInputStream get(io.netty.buffer.ByteBuf buf)
public void recycle()
public int readTag()
throws IOException
IOExceptionpublic int readUInt32()
throws IOException
uint32 field value from the stream.IOExceptionpublic int readEnum()
throws IOException
IOExceptionpublic boolean isAtEnd()
throws IOException
IOExceptionpublic void readMessage(ByteBufCodedInputStream.ByteBufMessageBuilder builder, org.apache.pulsar.shaded.com.google.protobuf.v241.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString readBytes()
throws IOException
bytes field value from the stream.IOExceptionpublic boolean skipField(int tag)
throws IOException
false if the tag is an endgroup tag, in which case nothing is skipped. Otherwise, returns
true.IOExceptionpublic void checkLastTagWas(int value)
throws org.apache.pulsar.shaded.com.google.protobuf.v241.InvalidProtocolBufferException
org.apache.pulsar.shaded.com.google.protobuf.v241.InvalidProtocolBufferException - value does not match the last tag.public double readDouble()
throws IOException
double field value from the stream.IOExceptionpublic float readFloat()
throws IOException
float field value from the stream.IOExceptionpublic long readUInt64()
throws IOException
uint64 field value from the stream.IOExceptionpublic long readInt64()
throws IOException
int64 field value from the stream.IOExceptionpublic int readInt32()
throws IOException
int32 field value from the stream.IOExceptionpublic long readFixed64()
throws IOException
fixed64 field value from the stream.IOExceptionpublic int readFixed32()
throws IOException
fixed32 field value from the stream.IOExceptionpublic boolean readBool()
throws IOException
bool field value from the stream.IOExceptionpublic long readRawVarint64()
throws IOException
IOExceptionpublic int readRawVarint32()
throws IOException
IOExceptionpublic int readRawLittleEndian32()
throws IOException
IOExceptionpublic long readRawLittleEndian64()
throws IOException
IOExceptionpublic long readSFixed64()
throws IOException
IOExceptionpublic void skipMessage()
throws IOException
IOExceptionpublic void skipRawBytes(int size)
throws IOException
size bytes.org.apache.pulsar.shaded.com.google.protobuf.v241.InvalidProtocolBufferException - The end of the stream or the current limit was reached.IOExceptionpublic int pushLimit(int byteLimit)
throws org.apache.pulsar.shaded.com.google.protobuf.v241.InvalidProtocolBufferException
org.apache.pulsar.shaded.com.google.protobuf.v241.InvalidProtocolBufferExceptionpublic void popLimit(int oldLimit)
oldLimit - The old limit, as returned by pushLimit.public int getBytesUntilLimit()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.