code: public static PublicKey readPemPublicKey(final File file) throws IOException,
  		NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
  	{
  		final String publicKeyAsString = readPemFileAsBase64(file);
  		final byte[] decoded = Base64.decodeBase64(publicKeyAsString);
  		return readPublicKey(decoded);
  	}
docs: reads a public key from a file.
  
  @param file
  the file
  @return the public key
  @throws IOException
  Signals that an I/O exception has occurred.
  @throws NoSuchAlgorithmException
  is thrown if instantiation of the cypher object fails.
  @throws InvalidKeySpecException
  is thrown if generation of the SecretKey object fails.
  @throws NoSuchProviderException
  is thrown if the specified provider is not registered in the security provider
  list.