jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Avoid binary streaming
Date Fri, 05 Oct 2012 13:43:50 GMT
On 04.10.2012, at 16:02, polofan123 <polofan@web.de> wrote:

> In my jackrabbit datastore there are large binary files stored. I can browse
> the datastore filesystem and open these files without any problems.
> Now how can I use these files from within my application? I of course could
> use the getStream() method of type jcr.binary but then I would just stream
> all the content of the already exsisting file into a new temporary file
> right?

Use Binary.read() [0] [1] to get random access to the file. It was explicitly designed for

> Since my binarys are very large I don't want that. I'm looking for a
> way to get the full filesystem path of a binary.

Breaking the JCR API abstraction by getting to the datastore file directly is not a good idea.

[0] http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Binary.html#read(byte[],%20long)
[1] http://www.day.com/specs/jcr/2.0/5_Reading.html#5.10.5%20Binary%20Object


View raw message