tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 122jxgcn <ywpar...@gmail.com>
Subject Re: Custom parser error
Date Wed, 01 Aug 2012 01:14:22 GMT
Hi Nick, sorry to bother again but I'm not quite sure of what you have said.


Nick Burch-2 wrote
> 
> On Tue, 31 Jul 2012, 122jxgcn wrote:
> If your TikaInputStream lacks a file, and getFile is called, one will 
> automatically be created for you. (That's part of the point!)
> 
I believe created file will be empty. Then how can I process the input file
without its data?

So basically, my file is converted to InputStream by

InputStream stream = HWPParserTest.class.getResourceAsStream(
                "/test-documents/testHWP.hwp");

After that, InputStream stream is passed to parser() of HWPParser
and it should be converted to TikaInputStream tstream without the loss of
input file data.
I'm currently doing

TikaInputStream tstream = TikaInputStream.get(stream);

right now.
I believe tstream.hasFile() should true right away in order to my parser
class to work.

Thanks a lot.



--
View this message in context: http://lucene.472066.n3.nabble.com/Custom-parser-error-tp3998302p3998536.html
Sent from the Apache Tika - Development mailing list archive at Nabble.com.

Mime
View raw message