code: private Collection<? extends java.security.cert.CRL>
          parseX509orPKCS7CRL(InputStream is)
          throws CRLException, IOException
      {
          Collection<X509CRLImpl> coll = new ArrayList<>();
          byte[] data = readOneBlock(is);
          if (data == null) {
              return new ArrayList<>(0);
          }
          try {
              PKCS7 pkcs7 = new PKCS7(data);
              X509CRL[] crls = pkcs7.getCRLs();
              // CRLs are optional in PKCS #7
              if (crls != null) {
                  return Arrays.asList(crls);
              } else {
                  // no crls provided
                  return new ArrayList<>(0);
              }
          } catch (ParsingException e) {
              while (data != null) {
                  coll.add(new X509CRLImpl(data));
                  data = readOneBlock(is);
              }
          }
          return coll;
      }
docs: /*
  Parses the data in the given input stream as a sequence of DER encoded
  X.509 CRLs (in binary or base 64 encoded format) OR as a single PKCS#7
  encoded blob (in binary or base 64 encoded format).