code: @Override
    public void writeExternal(ObjectOutput out) throws IOException {
      int dim = getDimensionality();
      out.writeInt(dim);
  
      for(double aMin : min) {
        out.writeDouble(aMin);
      }
  
      for(double aMax : max) {
        out.writeDouble(aMax);
      }
    }
docs: The object implements the writeExternal method to save its contents by
  calling the methods of DataOutput for its primitive values or calling the
  writeObject method of ObjectOutput for objects, strings, and arrays.
  
  @param out the stream to write the object to
  @throws java.io.IOException Includes any I/O exceptions that may occur
  @serialData Overriding methods should use this tag to describe the data
  layout of this Externalizable object. List the sequence of
  element types and, if possible, relate the element to a
  public/protected field and/or method of this Externalizable
  class.