ArrayBufferWriter<T>
Represents a heap-based, array-backed output sink into which data can be written.
Returns the total amount of space within the underlying buffer.
Returns the amount of space available that can still be written into without forcing the underlying buffer to grow.
Returns the amount of data written to the underlying buffer so far.
Returns the data written to the underlying buffer so far, as a ReadOnlyMemory<T>.
Returns the data written to the underlying buffer so far, as a ReadOnlySpan<T>.
public ArrayBufferWriter()
Creates an instance of an ArrayBufferWriter<T>, in which data can be written to,
with the default initial capacity.
Creates an instance of an ArrayBufferWriter<T>, in which data can be written to,
with an initial capacity specified.
Clears the data written to the underlying buffer.
Returns a Memory<T> to write to that is at least the requested length (specified by sizeHint).
If no sizeHint is provided (or it's equal to 0), some non-empty buffer is returned.
Returns a Span<T> to write to that is at least the requested length (specified by sizeHint).
If no sizeHint is provided (or it's equal to 0), some non-empty buffer is returned.