@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);
  }
}

@ 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 ) ; } }
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 .
