code: public static SecretKey getSecretKey(File keystore, String entryName,
  			String keyStorePassword) throws KeyStoreException,
  			NoSuchAlgorithmException, CertificateException,
  			FileNotFoundException, IOException, UnrecoverableEntryException {
  		KeyStore keyStore = KeyStore.getInstance("JCEKS");
  		FileInputStream fis = null;
  		if (keystore == null || !keystore.exists()
  				|| FileUtils.sizeOf(keystore) == 0) {
  			throw new FileNotFoundException();
  		}
  		if (StringUtils.isEmpty(keyStorePassword)) {
  			throw new KeyStoreException("No Keystore password provided.");
  		}
  		if (StringUtils.isEmpty(entryName)) {
  			throw new KeyStoreException("No Keystore entry name provided.");
  		}
  
  		fis = new FileInputStream(keystore);
  
  		return getSecretKey(fis, entryName, keyStorePassword);
  
  	}
docs: Method which will load a secret key from disk with the specified entry
  name.
  
  @param keystore
  {@link KeyStore} file to read.
  @param entryName
  Entry name of the key to be retrieved
  @param keyStorePassword
  Password used to open the {@link KeyStore}
  @return
  @throws KeyStoreException
  @throws NoSuchAlgorithmException
  @throws CertificateException
  @throws FileNotFoundException
  @throws IOException
  @throws UnrecoverableEntryException