DataSource3 extends DataSource2 to add a way to provide binary documents as an object that implements seek(), read(), and getLength() methods.
File
File: DataSource3.java
Package: com.dtsearch.engine
Syntax
Methods
Method |
Description |
---|---|
Use setDocStream to provide the binary contents of this document as an object instead of the byte array expected by setDocBytes. The object must implement seek, read, and getLength methods defined by the DataSourceStream interface. A single getNextDoc() call can return data through setDocBytes or setDocStream but not both. |
Remarks
If an IndexJob.dataSourceToIndex is based on DataSource3, the application can return binary data such as document files using a stream object that implements the com.dtsearch.engine.DataSourceStream interface. During a getNextDoc call, the DataSource would call setDocStream() to attach the stream object to the DataSource. For each getNextDoc call, only one instance of binary data can be returned, so setDocStream and setDocBytes cannot be used for a single document.
Class Hierarchy
com.dtsearch.engine.DataSource3