Java 8 PolicyQualifierInfo - 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 PolicyQualifierInfo class.

This code example shows how to use the following methods:getPolicyQualifier
        byte[] encoding = getDerEncoding();
        // get policy qualifier encoding 
        byte[] pqEncoding = new byte[28];
        System.arraycopy(encoding, 12, pqEncoding, 0, pqEncoding.length);
        // pass valid array 
        PolicyQualifierInfo i = new PolicyQualifierInfo(encoding);
        // get encoding 
        byte[] pqEncodingRet = i.getPolicyQualifier();
        // check returned array 
        assertTrue(Arrays.equals(pqEncoding, pqEncodingRet));
    } 
 
    /** 
     * Test #2 for <code>getPolicyQualifier()</code> method 
     * Assertion: a copy is returned each time 
     *  
     * @throws IOException 
     */ 
    public final void testGetPolicyQualifier02() throws IOException { 
        // get valid encoding 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getPolicyQualifierId
        // change OID to 1.3.98437.82818.1 
        encoding[5] = (byte)0x86;
        encoding[6] = (byte)0x81;
        encoding[8] = (byte)0x85;
        encoding[9] = (byte)0x87;
        i = new PolicyQualifierInfo(encoding);
        // get OID as String and check it 
        assertEquals("1.3.98437.82818.1", i.getPolicyQualifierId());
    } 
 
    /** 
     * Test for <code>toString()</code> method 
     * Assertion: returns description of the contents of this 
     * <code>PolicyQualifierInfo</code> as printable <code>String</code> 
     * @throws IOException 
     * 
     * @throws IOException 
     */ 
    public final void testToString() throws IOException {
        // get valid encoding 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 PolicyQualifierInfo Methods: