protected static String getExtension(String name) {
        int idx = name.lastIndexOf('.');
        //workaround for filenames ending with xml and another dot ending before that (my.mesh.xml)
        if (name.toLowerCase().endsWith(".xml")) {
            idx = name.substring(0, idx).lastIndexOf('.');
            if (idx == -1) {
                idx = name.lastIndexOf('.');
            }
        }
        if (idx <= 0 || idx == name.length() - 1) {
            return "";
        } else {
            return name.substring(idx + 1).toLowerCase();
        }
    }
<code>AssetKey</code> is a key that is used to
look up a resource from a cache.
This class should be immutable.
jme3-core/src/main/java/com/jme3/asset/AssetKey.java