TextConverter.Convert Method (Stream, TextWriter)

The Convert method converts the entire contents of sourceStream from its format to the format of destinationWriter and writes the result to destinationWriter.

Namespace:  Microsoft.Exchange.Data.TextConverters
Assembly:  Microsoft.Exchange.Data.Common (in Microsoft.Exchange.Data.Common.dll)

Syntax

'Declaration
Public Sub Convert ( _
    sourceStream As Stream, _
    destinationWriter As TextWriter _
)
'Usage
Dim instance As TextConverter
Dim sourceStream As Stream
Dim destinationWriter As TextWriter

instance.Convert(sourceStream, destinationWriter)
public void Convert(
    Stream sourceStream,
    TextWriter destinationWriter
)

Parameters

  • sourceStream
    Type: System.IO.Stream
    The Stream object that contains the data to convert.
  • destinationWriter
    Type: System.IO.TextWriter
    The destination TextWriter object in which to write the converted data.

Remarks

After finishing the conversion, the Convert method flushes destinationWriter but does not close sourceStream or destinationWriter.

The Convert method is overridden in the conversions that derive from it to perform a particular conversion. For example, the RtfToHtml object uses its overridden Convert method to convert input Rich Text Format (RTF) into output HTML.