code: @Override
    public void writeExternal(ObjectOutput out) throws IOException {
      super.writeExternal(out);
      int k_max = knnDistances.length;
      out.writeInt(k_max);
      for(int i = 0; i < k_max; i++) {
        out.writeDouble(knnDistances[i]);
      }
    }
docs: Calls the super method and writes the parameter k_max and the knn distances
  of this entry to the specified stream.
  
  @param out the stream to write the object to
  @throws java.io.IOException Includes any I/O exceptions that may occur