Code example for ObjectInput

Methods: readBytereadFloat

0
 
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException { 
 
        // VERSION 
        in.readByte();
 
        // LOAD FACTOR 
        float old_factor = _loadFactor;
        _loadFactor = in.readFloat();
 
        // AUTO COMPACTION LOAD FACTOR 
        _autoCompactionFactor = in.readFloat();
 
 
        // If we change the laod factor from the default, re-setup 
        if ( old_factor != _loadFactor ) {
            setUp((int)Math.ceil(DEFAULT_INITIAL_CAPACITY / _loadFactor));
        } 
    } 
}// THash