StreamOutputAdapter Class
Represents an output adapter that collects output into a Stream.
Inheritance Hierarchy

Namespace: GroupDocs.Search.Common
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.8
Syntax
public class StreamOutputAdapter : OutputAdapter

The StreamOutputAdapter type exposes the following members.

Constructors
  NameDescription
Public methodStreamOutputAdapter
Initializes a new instance of the StreamOutputAdapter class.
Properties
  NameDescription
Public propertyStream
Gets an output stream.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Learn more
Examples
The example demonstrates a typical usage of the class.
C#
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";

Index index = new Index(indexFolder); // Creating an index in the specified folder

index.Add(documentsFolder); // Indexing documents from the specified folder

DocumentInfo[] documents = index.GetIndexedDocuments(); // Getting information on indexed documents

using (Stream stream = new MemoryStream()) // Creating a stream
{
    StreamOutputAdapter adapter = new StreamOutputAdapter(stream); // Creating a stream output adapter
    index.GetDocumentText(documents[0], adapter); // Generating a document text into the stream
}
See Also