dcsimg
how can i get the size of all messages in a folder?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   yh_lee
Posted On:   Thursday, August 15, 2002 11:00 PM

how can i get the size of all messages in a folder?
one way i know is add the total size of all the messages.
someone can tell me an efficient way.
thanks!

Re: how can i get the size of all messages in a folder?

Posted By:   eimi_nos  
Posted On:   Thursday, August 15, 2002 11:40 PM

The methods listFiles() with length() of the class java.io.File, and some iteration for subfolders would afford you to know the total file size (in number of bytes) in the folder.
If the files contains only Strings and you would like to know the number of tokens, then the class java.util.StringTokenizer could be used (with iterations).
About | Sitemap | Contact