Code example for X509Certificate

Methods: getNotAfter

0
    /** 
     * getNotAfter() method testing. 
     */ 
    public void testGetNotAfter() { 
        assertEquals("Incorrect notAfter date",
                new Date(notAfter), certificate.getNotAfter());
    } 
     
    public static void printAsHex(int perLine, String prefix, 
                                        String delimiter, byte[] data) {
        for (int i=0; i<data.length; i++) {
            String tail = Integer.toHexString(0x000000ff & data[i]);
            if (tail.length() == 1) {
                tail = "0" + tail; 
            } 
            System.out.print(prefix + "0x" + tail + delimiter);
  
            if (((i+1)%perLine) == 0) {
                System.out.println();
            } 
        }