code: private void parseExtension(Extension ext) throws IOException {
          try {
              Class<?> extClass = OIDMap.getClass(ext.getExtensionId());
              if (extClass == null) {   // Unsupported extension
                  if (ext.isCritical()) {
                      unsupportedCritExt = true;
                  }
                  if (map.put(ext.getExtensionId().toString(), ext) == null) {
                      return;
                  } else {
                      throw new IOException("Duplicate extensions not allowed");
                  }
              }
              Constructor<?> cons = extClass.getConstructor(PARAMS);
  
              Object[] passed = new Object[] {Boolean.valueOf(ext.isCritical()),
                      ext.getExtensionValue()};
                      CertAttrSet<?> certExt = (CertAttrSet<?>)
                              cons.newInstance(passed);
                      if (map.put(certExt.getName(), (Extension)certExt) != null) {
                          throw new IOException("Duplicate extensions not allowed");
                      }
          } catch (InvocationTargetException invk) {
              Throwable e = invk.getTargetException();
              if (ext.isCritical() == false) {
                  // ignore errors parsing non-critical extensions
                  if (unparseableExtensions == null) {
                      unparseableExtensions = new TreeMap<String,Extension>();
                  }
                  unparseableExtensions.put(ext.getExtensionId().toString(),
                          new UnparseableExtension(ext, e));
                  if (debug != null) {
                      debug.println("Error parsing extension: " + ext);
                      e.printStackTrace();
                      HexDumpEncoder h = new HexDumpEncoder();
                      System.err.println(h.encodeBuffer(ext.getExtensionValue()));
                  }
                  return;
              }
              if (e instanceof IOException) {
                  throw (IOException)e;
              } else {
                  throw new IOException(e);
              }
          } catch (IOException e) {
              throw e;
          } catch (Exception e) {
              throw new IOException(e);
          }
      }
docs: Parse the encoded extension