libextractor
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libextractor] libextractor, java, windows


From: Christian Grothoff
Subject: Re: [libextractor] libextractor, java, windows
Date: Sat, 21 Apr 2007 16:40:04 -0600
User-agent: KMail/1.9.5

On Saturday 21 April 2007 15:13, Steve Whitlatch wrote:
<stuff DELETED>

> I'm really more interested in using the java bindings in a web app on
> Linux. I ran "javadoc" on the libextractor *.java files to get some docs
> and also looked at the libextractor(3) man page.

Well, Linux is easier.  You just need to make sure that the JVM finds the LE 
JNI bindings (set LD_LIBRARY_PATH appropriately).  

> I need to do something like pass a byte[] to the
> EXTRACTOR_KeywordList * kl = EXTRACTOR_getKeywords(ex, filename);
> function, but I see that is not possible. 

Well, it's not possible with the current Java implementation.  It is quite 
trivial to add this functionality if you're familiar with JNI.  The Java API 
was written before we added the respective function on the C side, and I 
never got around to adding it on the Java side, but it is trivial to do.

<stuff DELETED>

> Bingo! Except for the type of the argument passed to
> EXTRACTOR_getKeywords(ex, filename);
>
> How difficult would it be to include an overloaded function, something like
> EXTRACTOR_getKeywords(ex, byteArray);
>
> I can probably make my own JNI class files to call the libextractor C
> library, or maybe the present java binding will help in some way. I don't
> know yet. It is the passing in of the byte[] problem that must be solved
> first. Is this idea something libextractor developers can easily do? If so,
> can you show me how I might do that too?

I'll try to do it later tonight ;-).

> Perhaps this is a reasonable request for an enhancement to the libextractor
> library? Or, should I try to do it myself? After I saw the above code
> snippet, I started to remember a bit of C code. Any tips?

Perfectly reasonable request -- just wait 24h.

Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]