public static void getcipher(){
SSLServerSocketFactory ssf =(SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
TreeMap<String,Boolean> ciphers = new TreeMap<String,Boolean>();
for(String cipher:ssf.getSupportedCipherSuites())
ciphers.put(cipher,Boolean.FALSE);
String[] defaultCipherSuites = ssf.getDefaultCipherSuites();
for(String str:defaultCipherSuites){
System.out.println("defaultCipherSuites=="+str);
}
for(String cipher:defaultCipherSuites)
ciphers.put(cipher,Boolean.TRUE);
System.out.println("Default Cipher");
for(Entry< String,Boolean> cipher:ciphers.entrySet()){
System.out.printf("%-5s%s%n",(cipher.getValue()?'*':""),cipher.getKey());
}
}