BoundedStreamSetLength Method

Set the length of the stream.

Definition

Namespace: MimeKit.IO
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public override void SetLength(
	long value
)

Parameters

value  Int64
The desired length of the stream in bytes.

Remarks

Updates the EndBoundary to be StartBoundary plus the specified new length. If the BaseStream needs to be grown to allow this, then the length of the BaseStream will also be updated.

Exceptions

ObjectDisposedException The stream has been disposed.
NotSupportedException The stream does not support setting the length.
IOException An I/O error occurred.

See Also