public class URLConverterImpl extends Object implements URLConverter
Internal class.
Constructor and Description |
---|
URLConverterImpl() |
Modifier and Type | Method and Description |
---|---|
URL |
resolve(URL url)
Converts a URL that uses a client-defined protocol into a URL that uses a
protocol which is native to the Java class library (file, jar, http, etc).
|
URL |
toFileURL(URL url)
Converts a URL that uses a user-defined protocol into a URL that uses the file
protocol.
|
public URL toFileURL(URL url) throws IOException
URLConverter
If the protocol for the given URL is not recognized by this converter, the original URL is returned as-is.
toFileURL
in interface URLConverter
url
- the original URLIOException
- if an error occurs during the conversionpublic URL resolve(URL url) throws IOException
URLConverter
Note however that users of this API should not assume too much about the results of this method. While it may consistently return a file: URL in certain installation configurations, others may result in jar: or http: URLs.
If the protocol is not recognized by this converter, then the original URL is returned as-is.
resolve
in interface URLConverter
url
- the original URLIOException
- if unable to resolve URLCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.