Package org.jboss.netty.util
Class DefaultObjectSizeEstimator
- java.lang.Object
-
- org.jboss.netty.util.DefaultObjectSizeEstimator
-
- All Implemented Interfaces:
ObjectSizeEstimator
- Direct Known Subclasses:
AbstractTrafficShapingHandler.SimpleObjectSizeEstimator
public class DefaultObjectSizeEstimator extends Object implements ObjectSizeEstimator
The defaultObjectSizeEstimator
implementation for general purpose.
-
-
Constructor Summary
Constructors Constructor Description DefaultObjectSizeEstimator()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
estimateSize(Object o)
Returns the estimated size of the specified object in bytes.
-
-
-
Method Detail
-
estimateSize
public int estimateSize(Object o)
Description copied from interface:ObjectSizeEstimator
Returns the estimated size of the specified object in bytes.- Specified by:
estimateSize
in interfaceObjectSizeEstimator
- Returns:
- a positive integer which represents the size of the specified object in bytes
-
-