On Mon, Jun 14, 2010 at 04:52, Deepak J <deepakjac...@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
http://wiki.apache.org/jackrabbit/WebDAV#Injecting_a_binary_file

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com

Reply via email to