private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
  in.defaultReadObject();
  registrarID=new ServiceID(in);
  if (server == null) {
    throw new InvalidObjectException("null server");
  }
 else   if (leaseID == null) {
    throw new InvalidObjectException("null leaseID");
  }
}

private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { in . defaultReadObject ( ) ; registrarID = new ServiceID ( in ) ; if ( server == null ) { throw new InvalidObjectException ( "null server" ) ; } else if ( leaseID == null ) { throw new InvalidObjectException ( "null leaseID" ) ; } }
reads the default serializable field values for this instance , followed by the registrar ' s service id encoded as specified by the serviceid . writebytes method . verifies that the deserialized field values are non - null .
