jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Strasser <tobias.stras...@gmail.com>
Subject Re: examples of writing binary data to JCR
Date Mon, 25 Apr 2005 15:24:18 GMT
well:

in = new FileInputStream("somefime");
node.setProperty("myData", in);
node.save();

will add a binary property 'myData'  to 'node'.

node.getProperty("myData").getStream()

returns you an inputstream on your previously saved data.
hope that helps.

cheers, tobi

On 4/25/05, Dave Sag <dsag@visualitylife.com> wrote:
> Hi people,
> 
> Flushed with success from friday's first steps, I am now about to
> attempt something a little more ambitions, namely writing some binary
> data to the repository.
> 
> my first step is to download and read the JCR spec - only 250 odd
> pages.  however i cn only assume that this has been done by someone
> else before, someone who knows exactly what to do for a simple case
> anyway.  so if anyone has any second-steps examples or even clues on
> where in the spec i would best focus my time, please I am all ears
> 
> cheers
> 
> dave
> 
> 


-- 
------------------------------------------< tobias.strasser@day.com >---
Tobias Strasser, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97 
-----------------------------------------------< http://www.day.com >---

Mime
View raw message