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 ) ; }
Get the base filename of the given URI .