Ejemplo n.º 1
0
  /** {@inheritDoc} */
  public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION
    out.writeByte(0);

    // SUPER
    super.writeExternal(out);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = _states.length; i-- > 0; ) {
      if (_states[i] == FULL) {
        out.writeInt(_set[i]);
        out.writeInt(_values[i]);
      }
    }
  }
  /** {@inheritDoc} */
  @Override
  public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION
    out.writeByte(0);

    // SUPER
    super.writeExternal(out);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = capacity(); i-- > 0; ) {
      if (_states.get(i) == FULL) {
        out.writeChar(_set.get(i));
        out.writeChar(_values.get(i));
      }
    }
  }