Method Write
Write(byte[], int, int)
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
buffer
byte[]An array of bytes. This method copies
count
bytes frombuffer
to the current stream.offset
intThe zero-based byte offset in
buffer
at which to begin copying bytes to the current stream.count
intThe number of bytes to be written to the current stream.
Exceptions
- Argument
Exception The sum of
offset
andcount
is greater than the buffer length.- Argument
Null Exception buffer
is null.- Argument
Out OfRange Exception offset
orcount
is negative.- IOException
An I/O error occurred, such as the specified file cannot be found.
- Not
Supported Exception The stream does not support writing.
- Object
Disposed Exception Write(byte[], int,
int) was called after the stream was closed.