protected X509Certificate[] openCertificate(File certificateFile){
  try {
    FileInputStream is=new FileInputStream(certificateFile);
    return openCertificate(is,certificateFile.getName());
  }
 catch (  FileNotFoundException ex) {
    JOptionPane.showMessageDialog(frame,MessageFormat.format(res.getString("KeyStoreExplorerAction.NoReadFile.message"),certificateFile),res.getString("KeyStoreExplorerAction.OpenCertificate.Title"),JOptionPane.WARNING_MESSAGE);
    return null;
  }
}

protected X509Certificate [ ] openCertificate ( File certificateFile ) { try { FileInputStream is = new FileInputStream ( certificateFile ) ; return openCertificate ( is , certificateFile . getName ( ) ) ; } catch ( FileNotFoundException ex ) { JOptionPane . showMessageDialog ( frame , MessageFormat . format ( res . getString ( "KeyStoreExplorerAction.NoReadFile.message" ) , certificateFile ) , res . getString ( "KeyStoreExplorerAction.OpenCertificate.Title" ) , JOptionPane . WARNING_MESSAGE ) ; return null ; } }
open a certificate file .
