//package src;
/*
 * ExtUtils.java
 *
 * Created on March 16, 2004, 12:27 PM
 */

//package src;
/**
 *
 * @author  Rob Snelick
 * Utility so that only certain file extension are allowed. Used inconjuction
 * with the File Chooser.
 */
public class ExtUtils {

    public final static String xml = "xml";
    

    /*
     * Get the extension of a file.
     */
    public static String getExtension(java.io.File f) {
        String ext = null;
        String s = f.getName();
        int i = s.lastIndexOf('.');

        if (i > 0 &&  i < s.length() - 1) {
            ext = s.substring(i+1).toLowerCase();
        }
        return ext;
    }
  
}
