jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <pav...@git.es>
Subject RE: Getting the size of binary node content
Date Tue, 02 Oct 2007 09:40:46 GMT
El mar, 02-10-2007 a las 02:51 +0700, Hendrik Beck (camunda) escribió:
> Hi Alexander,
> 
> > make some property like "size" and set it while writing the file
> > content into the database, or are there any better solutions?
> 
> We are doing that and it works well for us. In our application this is being
> done "on the way" while reading the binary data and doing some other stuff.
> And yep, then you just add another property "size" and store that value in
> it, e.g. by extending the nt:file or nt:resource node types.
> 
> 
> We have also done it once by using the java.io.InputStream.available()
> method, e.g.
> 
> int size = myNode.getProperty("streamProperty").getStream().available();

In our application (OpenKM - Document Management System) we store file
size in a node property. I think it is faster than getting the document
content size every time.

-- 
GIT CONSULTORS 

www.git.es

Tel: +34 971 498 310
Fax: +34 971 496 189

C/ Francesc Rover, 2B. 
07003 Palma de Mallorca – Illes Balears (España)



Mime
View raw message