Skip to content

Reader<TInput>.ReadOwnedBuffer(int)

ReadOwnedBuffer(int)

View source
public ArcBuffer ReadOwnedBuffer(int length)
Reads bytes into an independently owned ArcBuffer.

Parameters

lengthint
The number of bytes to read.

Returns

An owned buffer which the caller must dispose, or ArcBuffer for a zero-length read.

Exceptions

System.ArgumentOutOfRangeException
length is negative.
System.IndexOutOfRangeException
The input contains fewer than length unread bytes.