1 31 package org.objectweb.proactive.ext.security.crypto; 32 33 63 import java.io.FileInputStream ; 64 import java.io.ObjectInputStream ; 65 66 67 73 public class CertificateReader { 74 75 80 public CertificateReader() { 81 } 82 83 89 public static void main(String [] args) { 90 String file_name = ""; 93 try { 94 file_name = args[0]; 95 } catch (Exception e) { 96 System.out.println("Usage : java CertificateReader mycertificate"); 97 } 98 try { 99 FileInputStream fin = new FileInputStream (file_name); 100 ObjectInputStream in = new ObjectInputStream (fin); 101 Object object = in.readObject(); 102 in.close(); 103 System.out.println(object.toString()); 104 } catch (Exception e) { 105 System.out.println("Exception : " + e); 106 } 107 } 108 } 109 | Popular Tags |