code: public void encodeInfo(OutputStream out) throws CRLException {
          try {
              DerOutputStream tmp = new DerOutputStream();
              DerOutputStream rCerts = new DerOutputStream();
              DerOutputStream seq = new DerOutputStream();
  
              if (version != 0) // v2 crl encode version
                  tmp.putInteger(version);
              infoSigAlgId.encode(tmp);
              if ((version == 0) && (issuer.toString() == null))
                  throw new CRLException("Null Issuer DN not allowed in v1 CRL");
              issuer.encode(tmp);
  
              if (thisUpdate.getTime() < YR_2050)
                  tmp.putUTCTime(thisUpdate);
              else
                  tmp.putGeneralizedTime(thisUpdate);
  
              if (nextUpdate != null) {
                  if (nextUpdate.getTime() < YR_2050)
                      tmp.putUTCTime(nextUpdate);
                  else
                      tmp.putGeneralizedTime(nextUpdate);
              }
  
              if (!revokedList.isEmpty()) {
                  for (X509CRLEntry entry : revokedList) {
                      ((X509CRLEntryImpl)entry).encode(rCerts);
                  }
                  tmp.write(DerValue.tag_Sequence, rCerts);
              }
  
              if (extensions != null)
                  extensions.encode(tmp, isExplicit);
  
              seq.write(DerValue.tag_Sequence, tmp);
  
              tbsCertList = seq.toByteArray();
              out.write(tbsCertList);
          } catch (IOException e) {
               throw new CRLException("Encoding error: " + e.getMessage());
          }
      }
docs: Encodes the "to-be-signed" CRL to the OutputStream.
  
  @param out the OutputStream to write to.
  @exception CRLException on encoding errors.