jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: reading a file from the jacrabbit repository
Date Sun, 23 Nov 2008 12:04:31 GMT
far4ever wrote:
> hi 
> i added an image to the repository but when i tried to get it back i wont
> get it. instead i seems to be null..

What exactly is null? The stream? Are you getting an exception?

 > ...
>          picture = (FileInputStream)
> image.getProperty("jcr:data").getValue().getStream();
> ...

The cast to FileInputStream looks fishy; I would expect a 
ClassCastException here (at least in general you can't rely on the type 
of InputStream, nor do you need to).

BR, Julian

View raw message