java.io.File has the length() method to return the length of the file.

> -----Original Message-----
> From: Navjot Singh [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 08, 2004 8:58 AM
> To: Struts Users Mailing List
> Subject: [OT] how to calculate the size of an object
> 
> 
> hi,
> 
> I use SAX parser to load an LDIF file into memory. Whatsoever data i 
> read, i fill into an object.
> 
> I need to know *the size of LDIFData object* at runtime. How 
> to do that?
> 
> Well the class structure is something like this
> 
> public class LDIFData{
>       ArrayList cards; // collection of Card
>       String filename;
>       long lastLoadedTime;
> }
> 
> public class Card{
>       String name;
>       String email
>       String mobile;
> }
> 
> -- 
> regards
> Navjot Singh
> 
> When you jump for joy, beware that no-one moves the ground 
> from beneath
> your feet. -- Stanislaw Lem, "Unkempt Thoughts"
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to