public static void main(String[] args) {
        String test = "sour cherry";
        if (args.length >= 1) {
            test = args[0];
        }

        String fsafile = "/home/gv/fsa/test/__testfsa__.__fsa__";
        //String fsafile = "/home/p13n/prelude/automata/query2dmozsegments.fsa";

        FSA fsa = new FSA(fsafile);

        System.out.println("Loading FSA file "+fsafile+": "+fsa.isOk());
        System.out.println("    version: " + fsa.version()/1000000 + "." +
                           (fsa.version()/1000) % 1000 + "." +
                           fsa.version() % 1000);
        System.out.println("    serial:  " + fsa.serial());
        System.out.println("    phash:   " + fsa.hasPerfectHash());

        FSA.State s = fsa.getState();

        s.start();
        for (int i=0; i < test.length(); i++) {
            s.delta(test.charAt(i));
        }
        System.out.println("\ndelta() char test " + test + ": " +
                           s.isFinal() + ", info: " + s.dataString() +
                           ", hash value: " + s.hash());

        s.start();
        s.delta(test);
        System.out.println("\ndelta() test " + test + ": " +
                           s.isFinal() + ", info: " + s.dataString() +
                           ", hash value: " + s.hash());

        s.lookup(test);
        String data =  s.dataString();
        System.out.println("\nlookup() test \"" + test + "\": " +
                           (s.lookup(test) != null) +
                           ", info: " + data + ", hash value: " + s.hash());

        String data2 = fsa.lookup(test);
        System.out.println("\nFSA.lookup() test \"" + test + "\": " + data2);
    }
Convenience method that returns the metadata string in the fsa
for the input lookup String, or null if the input string does
not exist in the fsa.
@param str The string to look up.
@return Metadata string from the fsa.
fsa/src/main/java/com/yahoo/fsa/FSA.java