Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InternalReadSpan()

ReadOnlySpan< byte > System.IO.MemoryStream.InternalReadSpan ( int count)
inlinepackageinherited

Definition at line 287 of file MemoryStream.cs.

288 {
290 int position = _position;
291 int num = position + count;
292 if ((uint)num > (uint)_length)
293 {
295 ThrowHelper.ThrowEndOfFileException();
296 }
297 ReadOnlySpan<byte> result = new ReadOnlySpan<byte>(_buffer, position, count);
298 _position = num;
299 return result;
300 }

References System.IO.MemoryStream._buffer, System.IO.MemoryStream._length, System.IO.MemoryStream._position, System.count, System.IO.MemoryStream.EnsureNotClosed(), and System.ThrowHelper.ThrowEndOfFileException().