cancel
Showing results for 
Search instead for 
Did you mean: 

document size?

jos_snellings
Champ in-the-making
Champ in-the-making
A standalone java program generates a report on the status of the archive.
Archive is in an Alfresco repository.
The program basically walks through a space hierarchy and lists document nodes.
Strangely enough, I am missing a way to extract the document size from the search results.

Of course … without having to transmit the document first.

Am I overlooking something? It is highly unlikely that such a method would not exist in web services.
2 REPLIES 2

tim-erwin
Champ in-the-making
Champ in-the-making
Hi Jos,

I just found it again, was wondering, too. The content service can give you the information:

theContents = contentService.read(new Predicate(theFile, null, null), Constants.PROP_CONTENT);
if (theContents != null) theContent = theContents[0];
int size = theContent.getLength();

Hope that helps,
Tim

jos_snellings
Champ in-the-making
Champ in-the-making
It sure does! I just did not dig deep enough (of course, afraid that 'read' acutally reads the content).
Thanks!