@Override
        public void write(int b) throws IOException {
            size++;
        }
Returns the size of an object in bytes. Determining size by serialization
is only used as a last resort.

@param object the object to calculate the size of
@return the size of an object in bytes.
@throws CannotCalculateSizeException if the size cannot be calculated
xmppserver/src/main/java/org/jivesoftware/util/cache/CacheSizes.java