org.jboss.netty.util
Class DefaultObjectSizeEstimator

java.lang.Object
  extended by org.jboss.netty.util.DefaultObjectSizeEstimator
All Implemented Interfaces:
ObjectSizeEstimator

public class DefaultObjectSizeEstimator
extends Object
implements ObjectSizeEstimator

The default ObjectSizeEstimator implementation for general purpose.

Version:
$Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
The Netty Project, Trustin Lee

Constructor Summary
DefaultObjectSizeEstimator()
          Creates a new instance.
 
Method Summary
 int estimateSize(Object o)
          Returns the estimated size of the specified object in bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObjectSizeEstimator

public DefaultObjectSizeEstimator()
Creates a new instance.

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 interface ObjectSizeEstimator
Returns:
a positive integer which represents the size of the specified object in bytes


Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.