ks.store(buffer, kspassword.toCharArray());
out.setContentType("application/octet-stream");
out.setHeader("Content-disposition", "filename=" + username + ".jks");
out.setContentLength(buffer.size());
buffer.writeTo(out.getOutputStream());
out.flushBuffer();
buffer.close();
}
private void sendPEMTokens(KeyStore ks, String username, String kspassword, HttpServletResponse out) throws Exception {