code: public static boolean isPrivateKeyPasswordProtected(final File file) throws IOException
  	{
  		boolean result = false;
  		if (isPemFormat(file))
  		{
  			try
  			{
  				readPemPrivateKey(file);
  			}
  			catch (Exception e)
  			{
  				result = true;
  			}
  		}
  		else
  		{
  			try
  			{
  				readPrivateKey(file);
  			}
  			catch (Exception e)
  			{
  				result = true;
  			}
  		}
  
  
  		return result;
  	}
docs: Checks if the given {@link File}( in *.der format) is password protected
  
  @param file
  the file( in *.der format) that contains the private key
  @return true, if if the given {@link File}( in *.der format) is password protected otherwise
  false
  
  @throws IOException
  Signals that an I/O exception has occurred.