jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Storing and retrieving PDF file
Date Tue, 12 May 2009 21:51:49 GMT
On Tue, May 12, 2009 at 11:03 PM, Stefan Droog <sdroog@educator.eu> wrote:
> But how can I get the pdf file back from the system?
>
> I tried something like the code below but I am not sure if it is the correct way. I want
to stream this pdf to the client
>
> Node root = session.getRootNode();
>
> Node content = root.getNode("BIRTRefCard.pdf/jcr:content");
>
> final InputStream in = content.getProperty("jcr:data").getStream();
>
> final String mime = content.getProperty("jcr:mimeType").getString();

Yes, that looks good.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message