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 defaultObjectSizeEstimatorimplementation 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 intestimateSize(Object o)Returns the estimated size of the specified object in bytes.
-
-
-
Method Detail
-
estimateSize
public int estimateSize(Object o)
Description copied from interface:ObjectSizeEstimatorReturns the estimated size of the specified object in bytes.- Specified by:
estimateSizein interfaceObjectSizeEstimator- Returns:
- a positive integer which represents the size of the specified object in bytes
-
-