public class StreamOutputAdapter extends OutputAdapter implements IStreamOutputAdapter
java.io.OutputStream.
Learn more
The example demonstrates a typical usage of the class.
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
final ByteArrayOutputStream stream = new ByteArrayOutputStream(); // Creating an output stream
StreamOutputAdapter adapter = new StreamOutputAdapter(stream); // Creating a stream output adapter
index.getDocumentText(documents[0], adapter); // Generating a document text into the stream
core| Constructor and Description |
|---|
StreamOutputAdapter(OutputFormat outputFormat,
OutputStream stream)
Initializes a new instance of the
StreamOutputAdapter class. |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getStream()
Gets an output stream.
|
getCore, getOutputFormatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOutputFormatpublic StreamOutputAdapter(OutputFormat outputFormat, OutputStream stream)
StreamOutputAdapter class.outputFormat - The output format.stream - The output stream.public final OutputStream getStream()
getStream in interface IStreamOutputAdapterCopyright © 2026. All rights reserved.