Package com.logicaldoc.core.parser
Class TarParser
- java.lang.Object
-
- com.logicaldoc.core.parser.AbstractParser
-
- com.logicaldoc.core.parser.TarParser
-
- All Implemented Interfaces:
Parser
public class TarParser extends AbstractParser
Class for parsing tar files.- Since:
- 8.7.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description TarParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
countPages(File input, String filename)
Same as the otherParser.countPages(InputStream, String)
, but use this when you have a file rather than a stream.int
countPages(InputStream input, String filename)
The number of pages is the number entriesvoid
internalParse(InputStream input, String filename, String encoding, Locale locale, String tenant, Document document, String fileVersion, StringBuilder 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, StringBuilder content) throws Exception
- Throws:
Exception
-
countPages
public int countPages(InputStream input, String filename)
The number of pages is the number entries- Specified by:
countPages
in interfaceParser
- Overrides:
countPages
in 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:Parser
Same as the otherParser.countPages(InputStream, String)
, but use this when you have a file rather than a stream.- Specified by:
countPages
in interfaceParser
- Overrides:
countPages
in classAbstractParser
- Parameters:
input
- the filefilename
- name of the file- Returns:
- the number of pages
-
-