13 messages in org.apache.jackrabbit.usersRe: Getting the size of binary node c...
FromSent OnAttachments
Alexander NesterovOct 1, 2007 11:11 am 
Hendrik Beck (camunda)Oct 1, 2007 12:51 pm 
Paco AvilaOct 2, 2007 2:40 am 
Hendrik Beck (camunda)Oct 2, 2007 4:39 am 
Thomas MuellerOct 2, 2007 6:07 am 
Alexander NesterovOct 2, 2007 6:27 am 
Hendrik Beck (camunda)Oct 2, 2007 6:31 am 
Thomas MuellerOct 2, 2007 6:44 am 
Paco AvilaOct 2, 2007 1:27 pm 
Stefan GuggisbergOct 3, 2007 5:01 am 
Paco AvilaOct 4, 2007 4:44 am 
Stefan GuggisbergOct 4, 2007 5:13 am 
Paco AvilaOct 4, 2007 6:50 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Getting the size of binary node contentActions...
From:Paco Avila (pav@git.es)
Date:Oct 4, 2007 6:50:07 am
List:org.apache.jackrabbit.users

El jue, 04-10-2007 a las 14:14 +0200, Stefan Guggisberg escribió:

On 10/4/07, Paco Avila <pav@git.es> wrote:

El mié, 03-10-2007 a las 14:02 +0200, Stefan Guggisberg escribió:

On 10/2/07, Paco Avila <pav@git.es> wrote:

El mar, 02-10-2007 a las 15:07 +0200, Thomas Mueller escribió:

Hi,

Property.getLength(): Returns the length of the value of this property. Returns the length in bytes if the value is a PropertyType.BINARY, otherwise it returns the number of characters needed to display the value in its string form. Returns -1 if the implementation cannot determine the length.

Does this not work, or did I misunderstand the problem?

I didn't notice the method :) Anyway, "Property.getLength()" is supposed to be so fast as getting the size stored in special a property?

yes, in fact even faster ;)

Do you mean that "node.getProperty("jcr:data").getLength()" is faster than "node.getProperty("my:size")?

no. i was saying that

property.getLenght();

is probably faster than

node.getProperty("my:size").getLong();

i.e. i was assuming that you'd already read the property. if that's not the case just reading a LONG property is certainly faster that reading a BINARY property.

not in my case, when I need to make repository statistics, and only need to get the stored data size no the data itself.

Thanks for the tip anyway! :)

-- 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)