if (inStream == null) throw new CRLException("missing input stream");
  private X509CRL generateCRL(InputStream inStream)    throws IOException, CRLException  {    if (!inStream.markSupported())      inStream = new BufferedInputStream(inStream, 8192);    inStream.mark(20);    int i = inStream.read();    if (i == -1)      throw new EOFException();    // If the input is in binary DER format, the first byte MUST be    // 0x30, which stands for the ASN.1 [UNIVERSAL 16], which is the    // UNIVERSAL SEQUENCE, with the CONSTRUCTED bit (0x20) set.    //    // So if we do not see 0x30 here we will assume it is in Base-64.    if (i != 0x30)      {        inStream.reset();        StringBuffer line = new StringBuffer(80);        do          {            line.setLength(0);            do              {                i = inStream.read();                if (i == -1)                  throw new EOFException();                if (i != '\n' && i != '\r')                  line.append((char) i);              }            while (i != '\n' && i != '\r');          }        while (!line.toString().startsWith(BEGIN_X509_CRL));        X509CRL ret = new X509CRL(           new BufferedInputStream(new Base64InputStream(inStream), 8192));        line.setLength(0);        line.append('-'); // Base64InputStream will eat this.        do          {            i = inStream.read();            if (i == -1)              throw new EOFException();            if (i != '\n' && i != '\r')              line.append((char) i);          }        while (i != '\n' && i != '\r');        // XXX ???        if (!line.toString().startsWith(END_X509_CRL))          throw new CRLException("no end-of-CRL marker");        return ret;      }    else      {        inStream.reset();        return new X509CRL(inStream);      }  }