You are here: com.dtsearch.engine Package > Interfaces > DataSource2 Class > DataSource2.setDocBytes Method
dtSearch Engine API for Java
DataSource2.setDocBytes Method
public void setDocBytes(byte[] data);

Use setDocBytes to provide an array of bytes for dtSearch to use as the binary contents of this document. To tell dtSearch to check for an array of bytes, the data source must return true from haveDocBytes().  

The calling program should call setDocBytes to provide the binary contents of a file to be indexed before returning from getNextDoc().  

While getDocText() can only return a stream of plain text, setDocBytes can return any type of binary data, such as the contents of a Word document or a PDF file.

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