• Home
  • Raw
  • Download

Lines Matching +full:end +full:- +full:of +full:- +full:stream

2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
10 // * Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
13 // copyright notice, this list of conditions and the following disclaimer
16 // * Neither the name of Google Inc. nor the names of its
22 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 /// primitives from the stream. It effectively encapsulates the lowest
50 /// levels of protocol buffer format.
61 /// Whether to leave the underlying stream open when disposing of this stream.
62 /// This is always true when there's no stream.
67 /// Buffer of data read from the stream or provided at construction time.
72 /// The stream to read further input from, or null if the byte array buffer was provided
75 private readonly Stream input;
88 … // Note that the checks are performed such that we don't end up checking obviously-valid things
89 // like non-null references for arrays we've just created.
110 …throw new ArgumentOutOfRangeException("length", "Length must be non-negative and within the buffer… in CodedInputStream()
115 …/// Creates a new <see cref="CodedInputStream"/> reading data from the given stream, which will be…
118 /// <param name="input">The stream to read from.</param>
119 public CodedInputStream(Stream input) : this(input, false) in CodedInputStream()
124 /// Creates a new <see cref="CodedInputStream"/> reading data from the given stream.
126 /// <param name="input">The stream to read from.</param>
128 … /// <c cref="CodedInputStream"/> is disposed; <c>false</c> to dispose of the given stream when the
130 public CodedInputStream(Stream input, bool leaveOpen) in CodedInputStream()
137 /// stream and buffer, using the default limits.
139 …internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, bool leaveOp… in CodedInputStream()
155 /// stream and buffer, using the specified limits.
158 /// This chains to the version with the default limits instead of vice versa to avoid
161 …internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimi… in CodedInputStream()
179 /// from an input stream.
182 …/// This method exists separately from the constructor to reduce the number of constructor overloa…
186 /// <param name="input">The input stream to read from</param>
187 /// <param name="sizeLimit">The total limit of data to read from the stream.</param>
191 … public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit) in CreateWithLimits()
198 /// Returns the current position in the input stream, or the position in the input buffer
206 … return input.Position - ((state.bufferSize + state.bufferSizeAfterLimit) - state.bufferPos);
214 /// the end of the stream.
219 /// Returns the size limit for this stream.
222 /// This limit is applied when reading from the underlying stream, as a sanity check. It is
223 /// not applied when reading from a byte array data source without an underlying stream.
232 … /// Returns the recursion limit for this stream. This limit is applied whilst reading messages,
233 /// to avoid maliciously-recursive data.
239 /// The recursion limit for this stream.
244 … /// Internal-only property; when set to true, unknown fields will be discarded while parsing.
253 … /// Internal-only property; provides extension identifiers to compatible messages while parsing.
263 internal Stream InternalInputStream => input;
268 /// Disposes of this instance, potentially closing any underlying stream.
271 … /// As there is no flushing to perform here, disposing of a <see cref="CodedInputStream"/> which
285 /// Verifies that the last call to ReadTag() returned tag 0 - in other words,
286 /// we've reached the end of the stream when we expected to.
296 #region Reading of tags etc
310 /// Reads a field tag, returning the tag of 0 for "end of stream".
313 /// If this method returns 0, it doesn't necessarily mean the end of all
314 /// the data in this CodedInputStream; it may be the end of the logical stream
317 /// <returns>The next field tag, or 0 for end of stream. (0 is never a valid tag.)</returns>
330 …thod throws <see cref="InvalidProtocolBufferException"/> if the last-read tag was an end-group tag.
332 …/// start-group tag. This behavior allows callers to call this method on any field they don't unde…
333 … /// resulting in an error if an end-group tag has not been paired with an earlier start-group tag.
335 … /// <exception cref="InvalidProtocolBufferException">The last tag was an end-group tag</exception>
336 …"InvalidOperationException">The last read operation read to the end of the logical stream</excepti…
353 /// Reads a double field from the stream.
362 /// Reads a float field from the stream.
371 /// Reads a uint64 field from the stream.
379 /// Reads an int64 field from the stream.
387 /// Reads an int32 field from the stream.
395 /// Reads a fixed64 field from the stream.
403 /// Reads a fixed32 field from the stream.
411 /// Reads a bool field from the stream.
419 /// Reads a string field from the stream.
428 /// Reads an embedded message field value from the stream.
434 …rst initialize a ParseContext from the current coded input stream only to parse the length of the … in ReadMessage()
435 …// we will need to switch back again to CodedInputStream-based parsing (which involves copying and… in ReadMessage()
437 …// For now, this inefficiency is fine, considering this is only a backward-compatibility scenario … in ReadMessage()
450 /// Reads an embedded group field from the stream.
466 /// Reads a bytes field value from the stream.
475 /// Reads a uint32 field value from the stream.
483 /// Reads an enum field value from the stream.
487 … // Currently just a pass-through, but it's nice to separate it logically from WriteInt32. in ReadEnum()
492 /// Reads an sfixed32 field value from the stream.
500 /// Reads an sfixed64 field value from the stream.
508 /// Reads an sint32 field value from the stream.
516 /// Reads an sint64 field value from the stream.
524 /// Reads a length for length-delimited data.
537 /// Peeks at the next tag in the stream. If it matches <paramref name="tag"/>,
539 /// stream is left in the original position and the method returns <c>false</c>.
552 /// Reads a raw Varint from the stream. If larger than 32 bits, discard the upper bits.
553 /// This method is optimised for the case where we've got lots of data in the buffer.
555 /// without constant rechecking of the buffer length.
565 /// read any bytes after the end of the varint. If you simply wrapped the
566 /// stream in a CodedInputStream and used ReadRawVarint32(Stream)
567 /// then you would probably end up reading past the end of the varint since
572 internal static uint ReadRawVarint32(Stream input) in ReadRawVarint32()
578 /// Reads a raw varint from the stream.
587 /// Reads a 32-bit little-endian integer from the stream.
596 /// Reads a 64-bit little-endian integer from the stream.
609 /// when descending into a length-delimited embedded message. The previous
639 /// Returns true if the stream has reached the end of the input. This is the
640 /// case if either the end of the underlying input source has been reached or
641 /// the stream has reached a limit created using PushLimit.
668 /// Reads a fixed size of bytes from the input.
671 /// the end of the stream or the current limit was reached
680 …/// Reads a top-level message or a nested message after the limits for this message have been push…
681 /// (parser will proceed until the end of the current limit)
682 …/// NOTE: this method needs to be public because it's invoked by the generated code - e.g. msg.Mer…