code: private ObjectStreamClass readClassDesc() throws ClassNotFoundException, IOException {
          byte tc = nextTC();
          switch (tc) {
              case TC_CLASSDESC:
                  return readNewClassDesc(false);
              case TC_PROXYCLASSDESC:
                  Class<?> proxyClass = readNewProxyClassDesc();
                  ObjectStreamClass streamClass = ObjectStreamClass.lookup(proxyClass);
                  streamClass.setLoadFields(ObjectStreamClass.NO_FIELDS);
                  registerObjectRead(streamClass, nextHandle(), false);
                  checkedSetSuperClassDesc(streamClass, readClassDesc());
                  return streamClass;
              case TC_REFERENCE:
                  return (ObjectStreamClass) readCyclicReference();
              case TC_NULL:
                  return null;
              default:
                  throw corruptStream(tc);
          }
      }
docs: Reads a class descriptor (an {@code ObjectStreamClass}) from the
  stream.
  
  @return the class descriptor read from the stream
  
  @throws IOException
  If an IO exception happened when reading the class
  descriptor.
  @throws ClassNotFoundException
  If the class corresponding to the class descriptor could not
  be found.