public class FileOutputAdapter extends OutputAdapter
Represents an output adapter that collects output into a file.
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
FileOutputAdapter adapter = new FileOutputAdapter("c:\\DocumentText.htm"); // Creating a file output adapter
index.getDocumentText(documents[0], adapter); // Generating a document text into the output file
Constructor and Description |
---|
FileOutputAdapter(String filePath)
Initializes a new instance of the
FileOutputAdapter class. |
Modifier and Type | Method and Description |
---|---|
protected Object |
createResultBuilder(TextOptions options) |
String |
getFilePath()
Gets an output file path.
|
createResultBuilder
public FileOutputAdapter(String filePath)
Initializes a new instance of the FileOutputAdapter
class.
filePath
- The output file path.public final String getFilePath()
Gets an output file path.
protected Object createResultBuilder(TextOptions options)
createResultBuilder
in class ResultBuilderFactory