Skip to content

PooledBufferStream.Write(byte[], int, int)

Write(byte[], int, int)

override
View source
public override void Write(byte[] buffer, int offset, int count)
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Parameters

bufferbyte[]
An array of bytes. This method copies count bytes from buffer to the current stream.
offsetint
The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
countint
The number of bytes to be written to the current stream.

Exceptions

System.ArgumentException
The sum of offset and count is greater than the buffer length.
System.ArgumentNullException
buffer is null.
System.ArgumentOutOfRangeException
offset or count is negative.
System.IO.IOException
An I/O error occurred, such as the specified file cannot be found.
System.NotSupportedException
The stream does not support writing.
System.ObjectDisposedException
System.IO.Stream.Write was called after the stream was closed.