Package com.logicaldoc.parser
Class ImageParser
- java.lang.Object
-
- com.logicaldoc.core.parser.AbstractParser
-
- com.logicaldoc.parser.ImageParser
-
- All Implemented Interfaces:
com.logicaldoc.core.parser.Parser
public class ImageParser extends com.logicaldoc.core.parser.AbstractParser
This parser reads images (supported formats are: jpg, jfif, bmp, jpeg, wbmp, png, gif) and extracts text using OCR.- Since:
- 3.5
- Author:
- Alessandro Gasparini - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description ImageParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extractMetadata(File file, StringBuffer output)
Extracts all image metadata placing them into the contentvoid
internalParse(InputStream input, String filename, String encoding, Locale locale, String tenant, StringBuffer output)
String
parse(File file, String filename, String encoding, Locale locale, String tenant)
-
-
-
Method Detail
-
parse
public String parse(File file, String filename, String encoding, Locale locale, String tenant)
- Specified by:
parse
in interfacecom.logicaldoc.core.parser.Parser
- Overrides:
parse
in classcom.logicaldoc.core.parser.AbstractParser
-
internalParse
public void internalParse(InputStream input, String filename, String encoding, Locale locale, String tenant, StringBuffer output)
-
extractMetadata
public void extractMetadata(File file, StringBuffer output)
Extracts all image metadata placing them into the content- Parameters:
file
- the image fileoutput
- the buffer that hosts the extracted metadata
-
-