cat.debug("Sent reply to client"); cat.debug(new String(b64cert));
log.debug("Sent reply to client"); log.debug(new String(b64cert));
    static public void sendNewB64Cert(byte[] b64cert, HttpServletResponse out)        throws Exception {        // Set content-type to general file        out.setContentType("application/octet-stream");        out.setHeader("Content-disposition", "filename=cert.pem");        String beg = "-----BEGIN CERTIFICATE-----\n";        String end = "\n-----END CERTIFICATE-----\n";        out.setContentLength(b64cert.length+beg.length()+end.length());        // Write the certificate        ServletOutputStream os = out.getOutputStream();        os.write(beg.getBytes());        os.write(b64cert);        os.write(end.getBytes());        out.flushBuffer();        cat.debug("Sent reply to client");        cat.debug(new String(b64cert));    }