public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); super.readExternal(in); int size = in.readInt(); setUp(size); while (size-- > 0) { char key = in.readChar(); short val = in.readShort(); put(key, val); } }
public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(0); super.writeExternal(out); out.writeInt(this._size); for (int i = this._states.length; i-- > 0; ) { if (this._states[i] == 1) { out.writeChar(this._set[i]); out.writeShort(this._values[i]); } } }
protected void removeAt(int index) { this._values[index] = this.no_entry_value; super.removeAt(index); }
public void clear() { super.clear(); Arrays.fill(this._set, 0, this._set.length, this.no_entry_key); Arrays.fill(this._values, 0, this._values.length, this.no_entry_value); Arrays.fill(this._states, 0, this._states.length, (byte) 0); }