Method | Description | |
---|---|---|
CreateInstance ( Stream input ) : |
Creates a new CodedInputStream reading data from the given stream.
|
|
CreateInstance ( byte buf ) : |
Creates a new CodedInputStream reading data from the given byte array.
|
|
PopLimit ( int oldLimit ) : void |
Discards the current limit, returning the previous limit.
|
|
PushLimit ( int byteLimit ) : int |
Sets currentLimit to (current position) + byteLimit. This is called when descending into a length-delimited embedded message. The previous limit is returned.
|
|
ReadBool ( ) : bool |
Read a bool field from the stream.
|
|
ReadBytes ( ) : ByteString |
Reads a bytes field value from the stream.
|
|
ReadDouble ( ) : double |
Read a double field from the stream.
|
|
ReadEnum ( ) : int |
Reads an enum field value from the stream. The caller is responsible for converting the numeric value to an actual enum.
|
|
ReadFloat ( ) : float |
Read a float field from the stream.
|
|
ReadGroup ( int fieldNumber, IBuilder builder, ExtensionRegistry extensionRegistry ) : void |
Reads a group field value from the stream.
|
|
ReadInt32 ( ) : int |
Read an int32 field from the stream.
|
|
ReadInt64 ( ) : long |
Read an int64 field from the stream.
|
|
ReadMessage ( IBuilder builder, ExtensionRegistry extensionRegistry ) : void |
Reads an embedded message field value from the stream.
|
|
ReadPrimitiveField ( FieldType fieldType ) : object |
Reads a field of any primitive type. Enums, groups and embedded messages are not handled by this method.
|
|
ReadRawByte ( ) : byte |
Read one byte from the input.
|
|
ReadRawBytes ( int size ) : System.ByteBuffer |
Read a fixed size of bytes from the input.
|
|
ReadSFixed32 ( ) : int |
Reads an sfixed32 field value from the stream.
|
|
ReadSFixed64 ( ) : long |
Reads an sfixed64 field value from the stream.
|
|
ReadSInt32 ( ) : int |
Reads an sint32 field value from the stream.
|
|
ReadSInt64 ( ) : long |
Reads an sint64 field value from the stream.
|
|
ReadString ( ) : String |
Reads a string field from the stream.
|
|
ReadUnknownGroup ( int fieldNumber, Google.ProtocolBuffers.UnknownFieldSet builder ) : void |
Reads a group field value from the stream and merges it into the given UnknownFieldSet.
|
|
ResetSizeCounter ( ) : void |
Resets the current size counter to zero (see SetSizeLimit).
|
|
SetRecursionLimit ( int limit ) : int |
Set the maximum message recursion depth. In order to prevent malicious messages from causing stack overflows, CodedInputStream limits how deeply messages may be nested. The default limit is 64. |
|
SetSizeLimit ( int limit ) : int |
Set the maximum message size. In order to prevent malicious messages from exhausting memory or causing integer overflows, CodedInputStream limits how large a message may be. The default limit is 64MB. You should set this limit as small as you can without harming your app's functionality. Note that size limits only apply when reading from an InputStream, not when constructed around a raw byte array (nor with ByteString.NewCodedInput). If you want to read several messages from a single CodedInputStream, you can call ResetSizeCounter() after each message to avoid hitting the size limit. |
|
SkipMessage ( ) : void |
Reads and discards an entire message. This will read either until EOF or until an endgroup tag, whichever comes first.
|
|
SkipRawBytes ( int size ) : void |
Reads and discards size bytes.
|
Method | Description | |
---|---|---|
CheckLastTagWas ( uint value ) : void | ||
CodedInputStream ( Stream input ) : System | ||
CodedInputStream ( byte buffer ) : System | ||
DecodeZigZag32 ( uint n ) : int | ||
DecodeZigZag64 ( ulong n ) : long | ||
ReadFixed32 ( ) : uint | ||
ReadFixed64 ( ) : ulong | ||
ReadRawLittleEndian32 ( ) : uint | ||
ReadRawLittleEndian64 ( ) : ulong | ||
ReadRawVarint32 ( ) : uint | ||
ReadRawVarint32 ( Stream input ) : uint |
Reads a varint from the input one byte at a time, so that it does not read any bytes after the end of the varint. If you simply wrapped the stream in a CodedInputStream and used ReadRawVarint32(Stream)} then you would probably end up reading past the end of the varint since CodedInputStream buffers its input.
|
|
ReadRawVarint64 ( ) : ulong | ||
ReadTag ( ) : uint | ||
ReadUInt32 ( ) : uint | ||
ReadUInt64 ( ) : ulong | ||
RecomputeBufferSizeAfterLimit ( ) : void | ||
RefillBuffer ( bool mustSucceed ) : bool |
Called when buffer is empty to read more bytes from the input. If mustSucceed is true, RefillBuffer() gurantees that either there will be at least one byte in the buffer when it returns or it will throw an exception. If mustSucceed is false, RefillBuffer() returns false if no more bytes were available.
|
|
SkipField ( uint tag ) : bool | ||
SkipImpl ( int amountToSkip ) : void |
Abstraction of skipping to cope with streams which can't really skip.
|
|
SlowReadRawVarint32 ( ) : uint |
Same code as ReadRawVarint32, but read each byte individually, checking for buffer overflow.
|
public static CreateInstance ( Stream input ) : |
||
input | Stream | |
return |
public static CreateInstance ( byte buf ) : |
||
buf | byte | |
return |
public ReadGroup ( int fieldNumber, IBuilder builder, ExtensionRegistry extensionRegistry ) : void | ||
fieldNumber | int | |
builder | IBuilder | |
extensionRegistry | ExtensionRegistry | |
return | void |
public ReadMessage ( IBuilder builder, ExtensionRegistry extensionRegistry ) : void | ||
builder | IBuilder | |
extensionRegistry | ExtensionRegistry | |
return | void |
public ReadPrimitiveField ( FieldType fieldType ) : object | ||
fieldType | FieldType | |
return | object |
public ReadRawBytes ( int size ) : System.ByteBuffer | ||
size | int | |
return | System.ByteBuffer |
public ReadUnknownGroup ( int fieldNumber, Google.ProtocolBuffers.UnknownFieldSet builder ) : void | ||
fieldNumber | int | |
builder | Google.ProtocolBuffers.UnknownFieldSet | |
return | void |