@Override public void readExternal(ObjectInput in) throws IOException {
  b=new double[in.readInt()];
  for (int p=0; p < b.length; p++) {
    b[p]=in.readDouble();
  }
}

@ Override public void readExternal ( ObjectInput in ) throws IOException { b = new double [ in . readInt ( ) ] ; for ( int p = 0 ; p < b . length ; p ++ ) { b [ p ] = in . readDouble ( ) ; } }
the object implements the readexternal method to restore its contents by calling the methods of datainput for primitive types and readobject for objects , strings and arrays . the readexternal method must read the values in the same sequence and with the same types as were written by writeexternal .
