src/main/java/org/jivesoftware/smack/util/collections/AbstractReferenceMap.java
protected void doReadObject(ObjectInputStream in) throws IOException,
            ClassNotFoundException {
        this.keyType = in.readInt();
        this.valueType = in.readInt();
        this.purgeValues = in.readBoolean();
        this.loadFactor = in.readFloat();
        int capacity = in.readInt();
        init();
        data = new HashEntry[capacity];
        while (true) {
            K key = (K) in.readObject();
            if (key == null) {
                break;
            }
            V value = (V) in.readObject();
            put(key, value);
        }
        threshold = calculateThreshold(data.length, loadFactor);
        // do not call super.doReadObject() as code there doesn't work for
        // reference map
    }
protected void doReadObject(ObjectInputStream in) throws IOException,
            ClassNotFoundException {
        this.keyType = in.readInt();
        this.valueType = in.readInt();
        this.purgeValues = in.readBoolean();
        this.loadFactor = in.readFloat();
        int capacity = in.readInt();
        init();
        data = new HashEntry[capacity];
        while (true) {
            K key = (K) in.readObject();
            if (key == null) {
                break;
            }
            V value = (V) in.readObject();
            put(key, value);
        }
        threshold = calculateThreshold(data.length, loadFactor);
        // do not call super.doReadObject() as code there doesn't work for
        // reference map
    }
Replaces the superclassm method to read the state of this class.
<p/>
Serialization is not one of the JDK's nicest topics. Normal serialization
will initialise the superclass before the subclass. Sometimes however,
this isn't what you want, as in this case the <code>put()</code> method
on read can be affected by subclass state.
<p/>
The solution adopted here is to deserialize the state data of this class
in this protected method. This method must be called by the
<code>readObject()</code> of the first serializable subclass.
<p/>
Subclasses may override if the subclass has a specific field that must be
present before <code>put()</code> or <code>calculateThreshold()</code>
will work correctly.

@param in
the input stream