Package cn.sliew.milky.objectsize
Class SerializableObjectSizeOfStragegy
- java.lang.Object
-
- cn.sliew.milky.objectsize.SerializableObjectSizeOfStragegy
-
- All Implemented Interfaces:
ObjectSizeOfStrategy
public class SerializableObjectSizeOfStragegy extends Object implements ObjectSizeOfStrategy
-
-
Constructor Summary
Constructors Constructor Description SerializableObjectSizeOfStragegy()
-
-
-
Method Detail
-
sizeOf
public long sizeOf(Object obj)
Description copied from interface:ObjectSizeOfStrategyComputes the size of an object. This typically is an estimation, not an absolute accurate size.- Specified by:
sizeOfin interfaceObjectSizeOfStrategy- Parameters:
obj- The serializable object to compute size of- Returns:
- The size of the object in bytes. failed with -1.
-
-