private ObjectStreamClass readClassDesc(boolean unshared) throws IOException {
  byte tc=bin.peekByte();
  ObjectStreamClass descriptor;
switch (tc) {
case TC_NULL:
    descriptor=(ObjectStreamClass)readNull();
  break;
case TC_REFERENCE:
descriptor=(ObjectStreamClass)readHandle(unshared);
break;
case TC_PROXYCLASSDESC:
descriptor=readProxyDesc(unshared);
break;
case TC_CLASSDESC:
descriptor=readNonProxyDesc(unshared);
break;
default :
throw new StreamCorruptedException(String.format("invalid type code: %02X",tc));
}
if (descriptor != null) {
validateDescriptor(descriptor);
}
return descriptor;
}

private ObjectStreamClass readClassDesc ( boolean unshared ) throws IOException { byte tc = bin . peekByte ( ) ; ObjectStreamClass descriptor ; switch ( tc ) { case TC_NULL : descriptor = ( ObjectStreamClass ) readNull ( ) ; break ; case TC_REFERENCE : descriptor = ( ObjectStreamClass ) readHandle ( unshared ) ; break ; case TC_PROXYCLASSDESC : descriptor = readProxyDesc ( unshared ) ; break ; case TC_CLASSDESC : descriptor = readNonProxyDesc ( unshared ) ; break ; default : throw new StreamCorruptedException ( String . format ( "invalid type code: %02X" , tc ) ) ; } if ( descriptor != null ) { validateDescriptor ( descriptor ) ; } return descriptor ; }
reads in and returns ( possibly null ) class descriptor . sets passhandle to class descriptor ' s assigned handle . if class descriptor cannot be resolved to a class in the local vm , a classnotfoundexception is associated with the class descriptor ' s handle .
