public static PrivateKey readPrivateKey ( final File root , final String directory , final String fileName ) throws NoSuchAlgorithmException , InvalidKeySpecException , NoSuchProviderException , IOException { final File privatekeyDir = new File ( root , directory ) ; final File privatekeyFile = new File ( privatekeyDir , fileName ) ; final PrivateKey privateKey = PrivateKeyReader . readPrivateKey ( privatekeyFile ) ; return privateKey ; }
Constructs from the given root parent directory and file name the file and reads the private key .