MobileForms Toolkit Documentation

ZipStream.Write Method 

Compress a block of bytes to this stream using data from a buffer.

public override void Write(
byte[] array,
int offset,
int count
);

Parameters

array
The array to which bytes are written.
offset
The byte offset in array at which to begin writing.
count
The maximum number of bytes to write.

Remarks

This method overrides Write.

The offset parameter gives the offset of the byte in array (the buffer index) at which to begin writing, and the count parameter gives the maximum number of bytes that will be compressed to this stream. If the comopress operation is successful, the current position of the stream is advanced by the number of bytes written. If an exception occurs, the current position of the stream is unchanged.

Exceptions

Exception TypeCondition
ArgumentNullExceptionarray is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionoffset or count is negative.
NotSupportedExceptionThe stream does not support writing.
IOExceptionAn I/O error occurs.
ArchiveCorruptedExceptionCompression error occurs.
ArgumentExceptionoffset and count describe an invalid range in array.
ObjectDisposedExceptionMethods were called after the stream was closed.

See Also

ZipStream Class | Resco.IO.Zip Namespace