Package com.logicaldoc.core.parser
Class OpenOfficeParser
- java.lang.Object
-
- com.logicaldoc.core.parser.AbstractParser
-
- com.logicaldoc.core.parser.OpenOfficeParser
-
- All Implemented Interfaces:
Parser
public class OpenOfficeParser extends AbstractParser
Text extractor for OpenOffice/OpenDocument documents. Tested with OpenOffice documents produced with 2.3,2.4,3.0.1 OO release Works with extensions (odt, ods, odp) and templates (ott, ots, otp). Tested with StarOffice documents (sxw, sxc, sxi)- Since:
- 4.5.2
- Author:
- Alessandro Gasparini - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description OpenOfficeParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountPages(File input, String filename)Same as the otherParser.countPages(InputStream, String), but use this when you have a file rather than a stream.intcountPages(InputStream input, String filename)Counts the number of pages of the given binary document.voidinternalParse(InputStream input, String filename, String encoding, Locale locale, String tenant, Document document, String fileVersion, StringBuffer content)-
Methods inherited from class com.logicaldoc.core.parser.AbstractParser
parse, parse, parse, parse
-
-
-
-
Method Detail
-
internalParse
public void internalParse(InputStream input, String filename, String encoding, Locale locale, String tenant, Document document, String fileVersion, StringBuffer content)
-
countPages
public int countPages(InputStream input, String filename)
Description copied from interface:ParserCounts the number of pages of the given binary document.- Specified by:
countPagesin interfaceParser- Overrides:
countPagesin classAbstractParser- Parameters:
input- binary content from which to extract the textfilename- name of the file- Returns:
- the number of pages
-
countPages
public int countPages(File input, String filename)
Description copied from interface:ParserSame as the otherParser.countPages(InputStream, String), but use this when you have a file rather than a stream.- Specified by:
countPagesin interfaceParser- Overrides:
countPagesin classAbstractParser- Parameters:
input- the filefilename- name of the file- Returns:
- the number of pages
-
-