Here you can find the source of getKeyStore(String path, String passwd, String storeType)
public static KeyStore getKeyStore(String path, String passwd, String storeType)
//package com.java2s; //License from project: Apache License import java.io.FileInputStream; import java.io.InputStream; import java.security.KeyStore; public class Main { public static KeyStore getKeyStore(String path, String passwd, String storeType) { try {//www . j a va 2 s. c om InputStream fis = new FileInputStream(path); KeyStore store = KeyStore.getInstance(storeType); store.load(fis, passwd.toCharArray()); return store; } catch (Exception e) { throw new RuntimeException(e); } } }