private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
  ois.defaultReadObject();
  int size=ois.readInt();
  index=new ConcurrentHashIndex<>(size);
  for (int i=0; i < size; ++i) {
    index.add(ois.readUTF());
  }
}

private void readObject ( ObjectInputStream ois ) throws ClassNotFoundException , IOException { ois . defaultReadObject ( ) ; int size = ois . readInt ( ) ; index = new ConcurrentHashIndex < > ( size ) ; for ( int i = 0 ; i < size ; ++ i ) { index . add ( ois . readUTF ( ) ) ; } }
custom deserializer . this is possible since the index is guaranteed to assign contiguous values .
