jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: How to get the file content from the Jackrabbit
Date Mon, 14 Jun 2010 11:10:03 GMT
On Mon, Jun 14, 2010 at 04:52, Deepak J <deepakjack24@gmail.com> wrote:
> Hi,
> I am new to Jackrabbit and I want to download the file content  from
> jackrabbit(For e.g. , there is file in jackrabbit  repository
> "/node1/imageFile.jpg" and I want to read the file content of
> "imageFile.jpg"  from jackrabbit and want to use this as file object and
> want to save it my local machine.
> Does any one please  let me know the method to get the file content

Programmatically it's simply like that (jcr 2.0, no error checking):

Binary bin = session.getNode("/node1/imageFile.jpeg/jcr:content").getProperty("jcr:data").getBinary();
bin.getSize() ...
bin.getStream() ...

For file-system based access you can mount the repository into your
filesystem via webdav. The jackrabbit-webapp war contains the webdav
endpoint already. See


Alexander Klimetschek

View raw message