|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.lang.WicketObjects.SerializingObjectSizeOfStrategy
public static final class WicketObjects.SerializingObjectSizeOfStrategy
WicketObjects.IObjectSizeOfStrategy
that works by serializing the object to an instance of
ByteCountingOutputStream
, which records the number of bytes written to it. Hence,
this gives the size of the object as it would be serialized,including all the overhead of
writing class headers etc. Not very accurate (the real memory consumption should be lower)
but the best we can do in a cheap way pre JDK 5.
Constructor Summary | |
---|---|
WicketObjects.SerializingObjectSizeOfStrategy()
|
Method Summary | |
---|---|
long |
sizeOf(java.io.Serializable object)
Computes the size of an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WicketObjects.SerializingObjectSizeOfStrategy()
Method Detail |
---|
public long sizeOf(java.io.Serializable object)
WicketObjects.IObjectSizeOfStrategy
sizeOf
in interface WicketObjects.IObjectSizeOfStrategy
object
- The serializable object to compute size of
WicketObjects.IObjectSizeOfStrategy.sizeOf(java.io.Serializable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |