public static String getStoreTypeByFileName(File _file) {

        String ext = SystemUtil.getFileExtension(_file.getName()).toLowerCase();
        switch (ext) {
            case STORETYPE_JKS:
            case STORETYPE_PKCS12:
            case STORETYPE_DER_ENCODED:
            case STORETYPE_JCEKS:
                return ext;
            default:
                return STORETYPE_JKS;
        }
    }
public static String getStoreTypeByFileName ( File _file ) { String ext = SystemUtil . getFileExtension ( _file . getName ( ) ) . toLowerCase ( ) ; switch ( ext ) { case STORETYPE_JKS : case STORETYPE_PKCS12 : case STORETYPE_DER_ENCODED : case STORETYPE_JCEKS : return ext ; default : return STORETYPE_JKS ; } }
Get the key/trust store 'type' by analyzing the filename extension.

@param _file file
@return store type as string, defaults to JKS