railo.commons.lang
Class SizeOf
java.lang.Object
railo.commons.lang.SizeOf
public class SizeOf
- extends Object
Calculation of object size.
Method Summary |
static long |
size(boolean value)
|
static long |
size(long value)
|
static long |
size(Object object)
|
static long |
size(Object object,
int maxDepth)
|
static long |
size2(Object o)
Calculates the size of an object. |
OBJECT_GRANULARITY_IN_BYTES
public static final int OBJECT_GRANULARITY_IN_BYTES
- See Also:
- Constant Field Values
WORD_SIZE
public static final int WORD_SIZE
HEADER_SIZE
public static final int HEADER_SIZE
DOUBLE_SIZE
public static final int DOUBLE_SIZE
- See Also:
- Constant Field Values
FLOAT_SIZE
public static final int FLOAT_SIZE
- See Also:
- Constant Field Values
LONG_SIZE
public static final int LONG_SIZE
- See Also:
- Constant Field Values
INT_SIZE
public static final int INT_SIZE
- See Also:
- Constant Field Values
SHORT_SIZE
public static final int SHORT_SIZE
- See Also:
- Constant Field Values
BYTE_SIZE
public static final int BYTE_SIZE
- See Also:
- Constant Field Values
BOOLEAN_SIZE
public static final int BOOLEAN_SIZE
- See Also:
- Constant Field Values
CHAR_SIZE
public static final int CHAR_SIZE
- See Also:
- Constant Field Values
REF_SIZE
public static final int REF_SIZE
SizeOf
public SizeOf()
size2
public static long size2(Object o)
- Calculates the size of an object.
- Parameters:
object
- the object that we want to have the size calculated.
- Returns:
- the size of the object or 0 if null.
size
public static long size(Object object)
size
public static long size(Object object,
int maxDepth)
size
public static long size(long value)
size
public static long size(boolean value)
Copyright © 2012 Railo