|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface URLConverter
The interface of the service that allows client-defined protocol URLs to be converted to native file URLs on the local file system.
Clients may implement this interface.
Method Summary | |
---|---|
java.net.URL |
resolve(java.net.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). |
java.net.URL |
toFileURL(java.net.URL url)
Converts a URL that uses a user-defined protocol into a URL that uses the file protocol. |
Method Detail |
---|
java.net.URL toFileURL(java.net.URL url) throws java.io.IOException
If the protocol for the given URL is not recognized by this converter, the original URL is returned as-is.
url
- the original URL
java.io.IOException
- if an error occurs during the conversionjava.net.URL resolve(java.net.URL url) throws java.io.IOException
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 reconized by this converter, then the original URL is returned as-is.
url
- the original URL
java.io.IOException
- if unable to resolve URL
java.io.IOException
- if an error occurs during the resolution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |