public interface FileParser extends FileActionComponent
FileActionComponent.Operation
CURRENT_FILE_DOCUMENT, CURRENT_OPERATION, FILE_SEPARATOR, PROCESSING_TYPE, REVISION
Modifier and Type | Method and Description |
---|---|
default void |
extractText(java.io.File inFile,
java.io.File outFile,
java.util.Map<java.lang.String,java.lang.Object> ctxt)
Parsers may implement this method for very efficient text extraction.
|
java.lang.String |
extractText(java.io.File file,
java.util.Map<java.lang.String,java.lang.Object> ctxt)
Parsers have to implement at least this method which extract the
text from the specified file and returns it.
|
getDescription, getName, getOrder, isAvailable
java.lang.String extractText(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> ctxt) throws ProcessingException
file
- the file to parsectxt
- a Map to share informations between processings.ProcessingException
- if the text could not be extracted.default void extractText(java.io.File inFile, java.io.File outFile, java.util.Map<java.lang.String,java.lang.Object> ctxt) throws ProcessingException
It allows parser to provide more efficient parsing for large file (i.e. consuming less memory without loading all text in memory).
The default implementation provided delegates to simpler and historical extractText(File, Map)
method.
inFile
- the file to parseoutFile
- the UTF-8 text file in which extracted text must be written.ctxt
- a Map to share informations between processings.ProcessingException
- if the text could not be extracted or saved.Copyright © 2001-2018 Jalios SA. All Rights Reserved.