File Handlers
File Handlers accept an InputStream for processing, and return the Documents they extract in an Iterator.
The provided InputStream and any other underlying resources are closed when the Iterator returns false
for hasNext()
.
As such, when working directly with these File Handlers, it is important to exhaust the Iterators they return.
File Handlers (Core)
- CSV File Handler: Extracts documents from a
csv
file. - JSON File Handler: Extracts documents from a
json
(or ajsonl
) file. - XML File Handler: Extracts documents from an
xml
file.
Custom File Handlers
Developers can implement and use custom File Handlers as needed. Extend BaseFileHandler
to get started. To use a custom
FileHandler
, you have to reference its class
in its Config. This is not needed when using the File Handlers provided by Lucille.
You can override the File Handlers provided by Lucille, as well - just include the class
you want to use in the Config.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.