private void readExternalData(Externalizable obj,ObjectStreamClass desc) throws IOException {
  SerialCallbackContext oldContext=curContext;
  if (oldContext != null)   oldContext.check();
  curContext=null;
  try {
    boolean blocked=desc.hasBlockExternalData();
    if (blocked) {
      bin.setBlockDataMode(true);
    }
    if (obj != null) {
      try {
        obj.readExternal(this);
      }
 catch (      ClassNotFoundException ex) {
        handles.markException(passHandle,ex);
      }
    }
    if (blocked) {
      skipCustomData();
    }
  }
  finally {
    if (oldContext != null)     oldContext.check();
    curContext=oldContext;
  }
}

private void readExternalData ( Externalizable obj , ObjectStreamClass desc ) throws IOException { SerialCallbackContext oldContext = curContext ; if ( oldContext != null ) oldContext . check ( ) ; curContext = null ; try { boolean blocked = desc . hasBlockExternalData ( ) ; if ( blocked ) { bin . setBlockDataMode ( true ) ; } if ( obj != null ) { try { obj . readExternal ( this ) ; } catch ( ClassNotFoundException ex ) { handles . markException ( passHandle , ex ) ; } } if ( blocked ) { skipCustomData ( ) ; } } finally { if ( oldContext != null ) oldContext . check ( ) ; curContext = oldContext ; } }
if obj is non - null , reads externalizable data by invoking readexternal ( ) method of obj ; otherwise , attempts to skip over externalizable data . expects that passhandle is set to obj ' s handle before this method is called .
