code: public static String getBaseName( String uri )
      {
          int lastSlash = uri.lastIndexOf( '/' );
          assert lastSlash != -1 : uri;
          assert lastSlash < uri.length() - 1 : "URI must not end with a slash: " + uri;
          return uri.substring( lastSlash + 1 );
      }
docs: Get the base filename of the given URI.
  
  @param uri the URI from which to get the base filename.
  @return a String containing everything after the last slash of the given URI.