protected String getLastPathLevel(String path) {

        path = path.trim();
        if (path.endsWith("/")) {
            path = path.substring(0, path.length() - 1);
        }
        if (path.contains("/")) {
            path = path.substring(path.lastIndexOf("/"));
        }
        return path;
    }
protected String getLastPathLevel ( String path ) { path = path . trim ( ) ; if ( path . endsWith ( "/" ) ) { path = path . substring ( 0 , path . length ( ) - 1 ) ; } if ( path . contains ( "/" ) ) { path = path . substring ( path . lastIndexOf ( "/" ) ) ; } return path ; }
Returns the last path level.<p>

@param path the path

@return the last path level