Java 8 CRLException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 CRLException class.

This code example shows how to use the following methods:getCause, getMessage
     * Test for <code>CRLException(String)</code> constructor Assertion: 
     * constructs CRLException when <code>msg</code> is null 
     */ 
    public void testCRLException03() { 
        String msg = null;
        CRLException tE = new CRLException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CRLException(Throwable)</code> constructor Assertion: 
     * constructs CRLException when <code>cause</code> is null 
     */ 
    public void testCRLException04() { 
        Throwable cause = null;
        CRLException tE = new CRLException(cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
6
CodeRank
This code example shows how to use the following methods:getCause, getMessage
     * Test for <code>CRLException(String)</code> constructor Assertion: 
     * constructs CRLException when <code>msg</code> is null 
     */ 
    public void testCRLException03() { 
        String msg = null;
        CRLException tE = new CRLException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CRLException(Throwable)</code> constructor Assertion: 
     * constructs CRLException when <code>cause</code> is null 
     */ 
    public void testCRLException04() { 
        Throwable cause = null;
        CRLException tE = new CRLException(cause);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
6
CodeRank
This code example shows how to use the following methods:
 
            return new X509Principal(X509Name.getInstance(tbsCertList.getIssuer()));
        } 
        catch (IOException e)
        { 
            throw new CRLException(e.toString());
        } 
    } 
} 
5
CodeRank
This code example shows how to use the following methods:toString
            { 
                return new JcaX509CRLHolder((X509CRL)o);
            } 
            catch (CRLException e)
            { 
                throw new IllegalArgumentException("Cannot encode object: " + e.toString());
            } 
        } 
        else if (o instanceof KeyPair)
        { 
            return convertObject(((KeyPair)o).getPrivate());
        } 
        else if (o instanceof PrivateKey)
        { 
            return PrivateKeyInfo.getInstance(((Key)o).getEncoded());
        } 
        else if (o instanceof PublicKey)
        { 
            return SubjectPublicKeyInfo.getInstance(((PublicKey)o).getEncoded());
        } 
5
CodeRank
This code example shows how to use the following methods:
        { 
            throw e;
        } 
        catch (Exception e)
        { 
            throw new CRLException(e.toString());
        } 
    } 
 
    /** 
     * Returns a (possibly empty) collection view of the CRLs read from 
     * the given input stream inStream. 
     * 
     * The inStream may contain a sequence of DER-encoded CRLs, or 
     * a PKCS#7 CRL set.  This is a PKCS#7 SignedData object, with the 
     * only signficant field being crls.  In particular the signature 
     * and the contents are ignored. 
     */ 
    public Collection engineGenerateCRLs(
        InputStream inStream)
5
CodeRank
This code example shows how to use the following methods:
 
            return new X509Principal(X509Name.getInstance(tbsCertList.getIssuer()));
        } 
        catch (IOException e)
        { 
            throw new CRLException(e.toString());
        } 
    } 
} 
5
CodeRank
This code example shows how to use the following methods:
        Exception cause = new Exception(msgs[1]); 
        CRLException dExc = new CRLException(msgs[0], cause); 
        String msg = null; 
        Throwable th = null; 
        return new Object[] { new CRLException(), new CRLException(msg), 
                new CRLException(msgs[1]), 
                new CRLException(new Throwable()), new CRLException(th), 
                new CRLException(msgs[1], dExc) }; 
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:
 
			return bOut.toByteArray();
		} 
		catch (IOException e)
		{ 
			throw new CRLException(e.toString());
		} 
	} 
 
    public BigInteger getSerialNumber()
	{ 
		return c.getUserCertificate().getValue();
	} 
 
    public Date getRevocationDate()
	{ 
		return c.getRevocationDate().getDate();
	} 
 
    public boolean hasExtensions() 
5
CodeRank
This code example shows how to use the following methods:
 
            this.isIndirect = isIndirectCRL();
        } 
        catch (Exception e)
        { 
            throw new CRLException("CRL contents invalid: " + e);
        } 
    } 
 
    /** 
     * Will return true if any extensions are present and marked 
     * as critical as we currently dont handle any extensions! 
     */ 
    public boolean hasUnsupportedCriticalExtension() 
    { 
        Set extns = getCriticalExtensionOIDs();
 
        if (extns == null)
        { 
            return false; 
4
CodeRank
This code example shows how to use the following methods:
        Exception cause = new Exception(msgs[1]); 
        CRLException dExc = new CRLException(msgs[0], cause); 
        String msg = null; 
        Throwable th = null; 
        return new Object[] { new CRLException(), new CRLException(msg), 
                new CRLException(msgs[1]), 
                new CRLException(new Throwable()), new CRLException(th), 
                new CRLException(msgs[1], dExc) }; 
    } 
 
    public static void main(String[] args) { 
        junit.textui.TestRunner.run(CRLExceptionTest.class); 
    } 
} 
4
CodeRank
See Code Examples for Java 8 CRLException Methods: