code: @Override
      protected void _from(ObjectInput in) throws IOException,
              ClassNotFoundException {
          // 1: read number of terms
          final int size = in.readInt();
          indexedTerms = sizedHashMap(size);
          for (int i = 0; i < size; ++i) {
              // 1: read each term
              final Term term = (Term) in.readObject();
              addTerm(term);
          }
  
          // 2: read number of global terms
          int gtisize = in.readInt();
          globalTermIndex = sizedHashMap(gtisize);
          for (int i = 0; i < gtisize; i++) {
              // 1: read global term key
              int key = in.readInt();
              // 2: read global term value
              int value = in.readInt();
              globalTermIndex.put(key, value);
          }
      }
docs: {@inheritDoc}