Code example for CertificateNotYetValidException

0
            return boolId;
        } 
             
        return null; 
    } 
     
    public void checkValidity()  
        throws CertificateExpiredException, CertificateNotYetValidException 
    { 
        this.checkValidity(new Date());
    } 
     
    public void checkValidity( 
        Date    date)
        throws CertificateExpiredException, CertificateNotYetValidException 
    { 
        if (date.after(this.getNotAfter()))
        { 
            throw new CertificateExpiredException("certificate expired on " + this.getNotAfter());
        }