public class TikaTextExtractor extends Object implements MediaTypeTextExtractor
| Constructor and Description |
|---|
TikaTextExtractor()
Construct an instance using the default
Tika configuration. |
TikaTextExtractor(String tikaConfigPath)
Construct an instance using a custom tika-config.xml configuration file.
|
public TikaTextExtractor()
Tika configuration.public TikaTextExtractor(String tikaConfigPath)
tikaConfigPath - the path to the tika-config.xml configuration file.public boolean supports(javax.ws.rs.core.MediaType mediaType)
MediaType is supported by this extractor.supports in interface MediaTypeTextExtractormediaType - to be checked.true if the provided MediaType as input is supported.public String extract(byte[] bytes) throws UnsupportedMediaTypeException
extract in interface MediaTypeTextExtractorbytes - an array of byte representing the input.String with the extracted text.UnsupportedMediaTypeException - if the input implicit Media type is not supported.Copyright © 2014 The Apache Software Foundation. All rights reserved.