docs: public ClassSpec getClassSpec(final String name) throws IOException {
          try {
              return doPrivileged(new PrivilegedExceptionAction<ClassSpec>() {
                  public ClassSpec run() throws Exception {
                      final VirtualFile file = getExistentVirtualFile(name);
                      if (file == null) return null;
                      final long size = file.getSize();
                      final ClassSpec spec = new ClassSpec();
                      synchronized (VFSResourceLoader.this) {
                          final InputStream is = file.openStream();
                          try {
                              if (size <= Integer.MAX_VALUE) {
                                  final int castSize = (int) size;
                                  byte[] bytes = new byte[castSize];
                                  int a = 0, res;
                                  while ((res = is.read(bytes, a, castSize - a)) > 0) {
                                      a += res;
                                  }
                                  // consume remainder so that cert check doesn't fail in case of wonky JARs
                                  while (is.read() != -1) {}
                                  // done
                                  is.close();
                                  spec.setBytes(bytes);
                                  final CodeSigner[] entryCodeSigners = file.getCodeSigners();
                                  final CodeSigners codeSigners = entryCodeSigners == null || entryCodeSigners.length == 0 ? EMPTY_CODE_SIGNERS : new CodeSigners(entryCodeSigners);
                                  CodeSource codeSource = codeSources.get(codeSigners);
                                  if (codeSource == null) {
                                      codeSources.put(codeSigners, codeSource = new CodeSource(rootUrl, entryCodeSigners));
                                  }
                                  spec.setCodeSource(codeSource);
                                  return spec;
                              } else {
                                  throw ServerLogger.ROOT_LOGGER.resourceTooLarge();
                              }
                          } finally {
                              VFSUtils.safeClose(is);
                          }
                      }
                  }
              });
          } catch (PrivilegedActionException pe) {
              try {
                  throw pe.getException();
              } catch (IOException | Error | RuntimeException e) {
                  throw e;
              } catch (Exception e) {
                  throw new UndeclaredThrowableException(e);
              }
          }
      }