Hi,

On 2 Aug 2012, at 08:50, 122jxgcn <[email protected]> wrote:

> I'm trying to execute binary file inside my custom parser.
> I put binary file on directory
> 
> tika-parsers/src/main/resources/bin/hwp2xml.bin

Have you thought about using the External Parser support?  You can take a look 
at it in org.apache.tika.parser.external.ExternalParser[1].

From the file name it looks like you may be converting between formats to ease 
parsing but this could offer an alternative allowing you to map patterns for 
metadata and content extraction via the tika-external-parsers.xml[2] 
configuration file.

If it isn't a viable option, this is still a good example on how you could 
execute an external command using Tika, because as Nick's suggests you will 
need have this executable located externally or extract it outside the JAR.

Cheers,
Dave

[1] 
http://svn.apache.org/repos/asf/tika/trunk/tika-core/src/main/java/org/apache/tika/parser/external/ExternalParser.java
 
[2] 
http://svn.apache.org/repos/asf/tika/trunk/tika-parsers/src/main/resources/org/apache/tika/parser/external/tika-external-parsers.xml

Reply via email to