Code example for X509Certificate

Methods: getEncoded

0
            CoreUtil.addPageInterceptListener(request.getSession(), l);
        } 
        File clientCertFile = new File(CoreUtil.getTempDownloadDirectory(getSessionInfo(request)), sel + ".cer");
        FileOutputStream out = new FileOutputStream(clientCertFile);
        X509Certificate cert = (X509Certificate) systemClientStore.getCertificate(sel);
        out.write(cert.getEncoded());
        out.flush();
        out.close();
        l.addDownload(new CSRDownload(clientCertFile, clientCertFile.getName(), "application/octet-stream", mapping
                        .findForward("success"), "exportCertificate.message", "keystore", sel));
        return mapping.findForward("success");
    } 
 
    /** 
     * @param mapping 
     * @param form 
     * @param request 
     * @param response 
     * @return ActionForward 
     * @throws Exception 
     */