public final class URLUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
URL_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static String |
getFilename(String uri) |
static String |
getFilename(URI uri)
Gets the file name of a given URI
|
static String |
removeParametersFromName(String filename)
Given a filename with (mostly) standard parameters
it will remove the parameters and return only the file name
|
public static final String URL_SEPARATOR
public static String removeParametersFromName(String filename)
filename
- the input file namepublic static String getFilename(URI uri) throws MalformedURLException
uri
- the input URI objectMalformedURLException
- if the URI is invalid or nullpublic static String getFilename(String uri) throws MalformedURLException, URISyntaxException
uri
- the input URIURISyntaxException
- if the syntax is invalidMalformedURLException
- if the URI is invalid or nullThis documentation was released into the public domain.