@Override public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(b.length);
  for (  double aB : b) {
    out.writeDouble(aB);
  }
}

@ Override public void writeExternal ( ObjectOutput out ) throws IOException { out . writeInt ( b . length ) ; for ( double aB : b ) { out . writeDouble ( aB ) ; } }
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 .
