Here you can find the source of getKeyStore(File file, char[] storePass)
public static KeyStore getKeyStore(File file, char[] storePass) throws IOException, GeneralSecurityException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.KeyStore; public class Main { public static KeyStore getKeyStore(String fileURL, char[] storePass) throws IOException, GeneralSecurityException { File f = new File(fileURL); return getKeyStore(f, storePass); }/*from w ww . j a v a 2s. c o m*/ public static KeyStore getKeyStore(File file, char[] storePass) throws IOException, GeneralSecurityException { FileInputStream ksInputStream = new FileInputStream(file); KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); ks.load(ksInputStream, storePass); return ks; } }