private File getKeyPath(final Key key) {
        KeyType keyType = null;
        if (key instanceof PrivateKey) {
            keyType = KeyType.PRIVATE;
        } else if (key instanceof PublicKey) {
            keyType = KeyType.PUBLIC;
        } else if (key instanceof SecretKey) {
            keyType = KeyType.SECRET;
        }
        return getKeyPath(keyType);
    }
private File getKeyPath ( final Key key ) { KeyType keyType = null ; if ( key instanceof PrivateKey ) { keyType = KeyType . PRIVATE ; } else if ( key instanceof PublicKey ) { keyType = KeyType . PUBLIC ; } else if ( key instanceof SecretKey ) { keyType = KeyType . SECRET ; } return getKeyPath ( keyType ) ; }
Given the type of key, this method will return the File path to that key.
@param key the type of key
@return a File representing the path to the key