You are here: com.dtsearch.engine Package > Interfaces > DataSource3 Class
dtSearch Engine API for Java
DataSource3 Class

DataSource3 extends DataSource2 to add a way to provide binary documents as an object that implements seek(), read(), and getLength() methods.


Package: com.dtsearch.engine 

public abstract class DataSource3 extends com.dtsearch.engine.DataSource2;

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.

Copyright (c) 1998-2022 dtSearch Corp. All rights reserved.