Code example for CertificateException

0
    } 
 
    public Certificate engineGenerateCertificate(InputStream inStream)
            throws CertificateException { 
        if (!(inStream instanceof DataInputStream)) {
            throw new CertificateException("Incorrect inputstream");
        } 
        return null; 
    } 
 
    @SuppressWarnings("unchecked") 
    public Collection engineGenerateCertificates(InputStream inStream)
            throws CertificateException { 
        if (!(inStream instanceof DataInputStream)) {
            throw new CertificateException("Incorrect inputstream");
        } 
        return null; 
    } 
 
    public CRL engineGenerateCRL(InputStream inStream) throws CRLException {
        if (!(inStream instanceof DataInputStream)) {