public static FSA loadFSA(File file, Query query) throws IOException {
        log(utilsLogger, query, "Loading FSA file");
        String filePath = null;

        try {
            filePath = file.getAbsolutePath();
        } catch (SecurityException e1) {
            error(utilsLogger, query, "No read access for the FSA file");
            throw new IOException("No read access for the FSA file");
        }

        FSA fsa = loadFSA(filePath, query);

        return fsa;
    }
Load FSA from file

@param file FSA dictionary file object
@param query Query object from the searcher, could be null if not available
@return FSA The FSA object for the input file path
container-search/src/main/java/com/yahoo/search/query/rewrite/RewriterUtils.java