接口 DocumentSource
public interface DocumentSource
Defines the interface for a Document source.
Documents can be loaded from various sources such as the file system, HTTP, FTP, etc.
-
方法概要
修饰符和类型方法说明Provides an InputStream to read the content of the document.metadata()Returns the metadata associated with the source of the document.
-
方法详细资料
-
inputStream
Provides an InputStream to read the content of the document. This method can be implemented to read from various sources like a local file or a network connection.- 返回:
- An InputStream from which the document content can be read.
- 抛出:
IOException- If an I/O error occurs while creating the InputStream.
-
metadata
Metadata metadata()Returns the metadata associated with the source of the document. This could include details such as the source location, date of creation, owner, etc.- 返回:
- A Metadata object containing information associated with the source of the document.
-