Hi,

Thanks for the response. Unfortunately, when I tried that, it returned an
empty string. The same thing happened when I tried parser.parse() and used
BodyContentHandler.toString().

The input stream says that data is available, however, before it is passed
into Tika. Any other ideas?

Thanks,
Matthew Taylor


On Mon, Feb 18, 2013 at 8:50 AM, Jukka Zitting <[email protected]>wrote:

> Hi,
>
> On Mon, Feb 18, 2013 at 6:21 AM, Matthew Taylor <[email protected]>
> wrote:
> > I am trying to use Tika within Apache Sling as a way to parse through
> > documents uploaded into file nodes. Ideally, I want to be able to take an
> > uploaded file within Sling's file node structure, and parse it for text
> > contained within a document, which will be returned as a string.
> Currently,
> > I have my program set up in the following way:
>
> Have you tried:
>
>     new Tika().parseToString(node.getBinary().getStream())
>
> That should cover your use case and be much simpler than what you're now
> doing.
>
> BR,
>
> Jukka Zitting
>



-- 
Matthew Taylor
Software Consultant
Behavioral Media Networks - http://launch.bmedianet.com/
Email: [email protected]

Reply via email to