Package com.logicaldoc.core.parser
Class TXTParser
java.lang.Object
com.logicaldoc.core.parser.AbstractParser
com.logicaldoc.core.parser.TXTParser
- All Implemented Interfaces:
Parser
Class for parsing text (*.txt) files.
- Since:
- 3.5
- Author:
- Michael Scholz, Alessandro Gasparini - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
internalParse
(InputStream input, ParseParameters parameters, StringBuilder content) parse
(File file, String filename, String encoding, Locale locale, String tenant, Document document, String fileVersion) Same asParser.parse(InputStream, ParseParameters)
, but use this when you have a file rather than a stream.Methods inherited from class com.logicaldoc.core.parser.AbstractParser
countPages, countPages, parse, parse, parse
-
Constructor Details
-
TXTParser
public TXTParser()
-
-
Method Details
-
parse
public String parse(File file, String filename, String encoding, Locale locale, String tenant, Document document, String fileVersion) Description copied from interface:Parser
Same asParser.parse(InputStream, ParseParameters)
, but use this when you have a file rather than a stream.- Specified by:
parse
in interfaceParser
- Overrides:
parse
in classAbstractParser
- Parameters:
file
- the filefilename
- name of the fileencoding
- character encodinglocale
- the localetenant
- name of the tenantdocument
- the document the file belongs to (optional)fileVersion
- the file version being processed (optional)- Returns:
- the extracted text
-
internalParse
-