Share via


MimeWriter.GetContentWriteStream Method

The GetContentWriteStream method returns a stream to which you can write the content of the current part using the current value of Content-Transfer-Encoding header.

Namespace: Microsoft.Exchange.Data.Mime
Assembly: Microsoft.Exchange.Data.Common (in microsoft.exchange.data.common.dll)

Syntax

'Declaration
Public Function GetContentWriteStream As Stream
public Stream GetContentWriteStream ()
public:
Stream^ GetContentWriteStream ()
public Stream GetContentWriteStream ()
public function GetContentWriteStream () : Stream

Exceptions

Exception type Condition
InvalidOperationException

The GetContentWriteStream method throws this exception if GetContentWriteStream is called twice, if the Content-Transfer-Encoding header has not been written, or if it has been written with a value representing an unrecognized encoding.

Remarks

You must write the Content-Transfer-Encoding header with a supported value before calling the GetContentWriteStream method.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003,

Target Platforms

Windows Server 2003