프로퍼티 | 타입 | 설명 | |
---|---|---|---|
CheckReadEndOfStreamTag | void | ||
CodedInputStream | Google.Protobuf.Collections | ||
CodedInputStream | Google.Protobuf.Collections | ||
DecodeZigZag32 | int | ||
DecodeZigZag64 | long | ||
PopLimit | void | ||
PushLimit | int | ||
ReadRawByte | byte | ||
ReadRawBytes | byte[] | ||
ReadRawLittleEndian32 | uint | ||
ReadRawLittleEndian64 | ulong | ||
ReadRawVarint32 | uint | ||
ReadRawVarint32 | uint | ||
ReadRawVarint64 | ulong | ||
RecomputeBufferSizeAfterLimit | void | ||
RefillBuffer | bool | ||
SkipGroup | void | ||
SkipImpl | void | ||
SkipRawBytes | void | ||
SlowReadRawVarint32 | uint |
메소드 | 설명 | |
---|---|---|
CodedInputStream ( Stream input ) : Google.Protobuf.Collections |
Creates a new CodedInputStream reading data from the given stream, which will be disposed when the returned object is disposed.
|
|
CodedInputStream ( Stream input, bool leaveOpen ) : Google.Protobuf.Collections |
Creates a new CodedInputStream reading data from the given stream.
|
|
CodedInputStream ( byte buffer ) : Google.Protobuf.Collections |
Creates a new CodedInputStream reading data from the given byte array.
|
|
CodedInputStream ( byte buffer, int offset, int length ) : Google.Protobuf.Collections |
Creates a new CodedInputStream that reads from the given byte array slice.
|
|
CreateWithLimits ( Stream input, int sizeLimit, int recursionLimit ) : |
Creates a CodedInputStream with the specified size and recursion limits, reading from an input stream. This method exists separately from the constructor to reduce the number of constructor overloads. It is likely to be used considerably less frequently than the constructors, as the default limits are suitable for most use cases. |
|
Dispose ( ) : void |
Disposes of this instance, potentially closing any underlying stream. As there is no flushing to perform here, disposing of a CodedInputStream which was constructed with the |
|
MaybeConsumeTag ( uint tag ) : bool |
Peeks at the next tag in the stream. If it matches tag, the tag is consumed and the method returns
|
|
PeekTag ( ) : uint |
Peeks at the next field tag. This is like calling ReadTag, but the tag is not consumed. (So a subsequent call to ReadTag will return the same value.)
|
|
ReadBool ( ) : bool |
Reads a bool field from the stream.
|
|
ReadBytes ( ) : ByteString |
Reads a bytes field value from the stream.
|
|
ReadDouble ( ) : double |
Reads a double field from the stream.
|
|
ReadEnum ( ) : int |
Reads an enum field value from the stream.
|
|
ReadFixed32 ( ) : uint |
Reads a fixed32 field from the stream.
|
|
ReadFixed64 ( ) : ulong |
Reads a fixed64 field from the stream.
|
|
ReadFloat ( ) : float |
Reads a float field from the stream.
|
|
ReadInt32 ( ) : int |
Reads an int32 field from the stream.
|
|
ReadInt64 ( ) : long |
Reads an int64 field from the stream.
|
|
ReadLength ( ) : int |
Reads a length for length-delimited data. This is internally just reading a varint, but this method exists to make the calling code clearer. |
|
ReadMessage ( IMessage builder ) : void |
Reads an embedded message field value from the stream.
|
|
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.
|
|
ReadTag ( ) : uint |
Reads a field tag, returning the tag of 0 for "end of stream". If this method returns 0, it doesn't necessarily mean the end of all the data in this CodedInputStream; it may be the end of the logical stream for an embedded message, for example. |
|
ReadUInt32 ( ) : uint |
Reads a uint32 field value from the stream.
|
|
ReadUInt64 ( ) : ulong |
Reads a uint64 field from the stream.
|
|
SkipLastField ( ) : void |
Skips the data for the field with the tag we've just read. This should be called directly after ReadTag, when the caller wishes to skip an unknown field. This method throws InvalidProtocolBufferException if the last-read tag was an end-group tag. If a caller wishes to skip a group, they should skip the whole group, by calling this method after reading the start-group tag. This behavior allows callers to call this method on any field they don't understand, correctly resulting in an error if an end-group tag has not been paired with an earlier start-group tag. |
메소드 | 설명 | |
---|---|---|
CheckReadEndOfStreamTag ( ) : void |
Verifies that the last call to ReadTag() returned tag 0 - in other words, we've reached the end of the stream when we expected to.
|
|
CodedInputStream ( Stream input, byte buffer, int bufferPos, int bufferSize ) : Google.Protobuf.Collections |
Creates a new CodedInputStream reading data from the given stream and buffer, using the default limits.
|
|
CodedInputStream ( Stream input, byte buffer, int bufferPos, int bufferSize, int sizeLimit, int recursionLimit ) : Google.Protobuf.Collections |
Creates a new CodedInputStream reading data from the given stream and buffer, using the specified limits. This chains to the version with the default limits instead of vice versa to avoid having to check that the default values are valid every time. |
|
DecodeZigZag32 ( uint n ) : int |
Decode a 32-bit value with ZigZag encoding. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.) |
|
DecodeZigZag64 ( ulong n ) : long |
Decode a 32-bit value with ZigZag encoding. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.) |
|
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.
|
|
ReadRawByte ( ) : byte |
Read one byte from the input.
|
|
ReadRawBytes ( int size ) : byte[] |
Reads a fixed size of bytes from the input.
|
|
ReadRawLittleEndian32 ( ) : uint |
Reads a 32-bit little-endian integer from the stream.
|
|
ReadRawLittleEndian64 ( ) : ulong |
Reads a 64-bit little-endian integer from the stream.
|
|
ReadRawVarint32 ( ) : uint |
Reads a raw Varint from the stream. If larger than 32 bits, discard the upper bits. This method is optimised for the case where we've got lots of data in the buffer. That means we can check the size just once, then just read directly from the buffer without constant rechecking of the buffer length.
|
|
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 |
Reads a raw varint from the stream.
|
|
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.
|
|
SkipGroup ( uint startGroupTag ) : void | ||
SkipImpl ( int amountToSkip ) : void |
Abstraction of skipping to cope with streams which can't really skip.
|
|
SkipRawBytes ( int size ) : void |
Reads and discards size bytes.
|
|
SlowReadRawVarint32 ( ) : uint |
Same code as ReadRawVarint32, but read each byte individually, checking for buffer overflow.
|
public CodedInputStream ( Stream input ) : Google.Protobuf.Collections | ||
input | Stream | The stream to read from. |
리턴 | Google.Protobuf.Collections |
public CodedInputStream ( Stream input, bool leaveOpen ) : Google.Protobuf.Collections | ||
input | Stream | The stream to read from. |
leaveOpen | bool | |
리턴 | Google.Protobuf.Collections |
public CodedInputStream ( byte buffer ) : Google.Protobuf.Collections | ||
buffer | byte | |
리턴 | Google.Protobuf.Collections |
public CodedInputStream ( byte buffer, int offset, int length ) : Google.Protobuf.Collections | ||
buffer | byte | |
offset | int | |
length | int | |
리턴 | Google.Protobuf.Collections |
public static CreateWithLimits ( Stream input, int sizeLimit, int recursionLimit ) : |
||
input | Stream | The input stream to read from |
sizeLimit | int | The total limit of data to read from the stream. |
recursionLimit | int | The maximum recursion depth to allow while reading. |
리턴 |