public class FileHandler extends URLStreamHandler
| Constructor and Description |
|---|
FileHandler() |
| Modifier and Type | Method and Description |
|---|---|
URLConnection |
openConnection(URL url)
Returns a connection to the a file pointed by this
URL in
the file system |
URLConnection |
openConnection(URL url,
Proxy proxy)
The behavior of this method is the same as openConnection(URL).
|
protected void |
parseURL(URL url,
String spec,
int start,
int end)
Parse the
stringstr into URL u which
already have the context properties. |
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, sameFile, setURL, setURL, toExternalFormpublic URLConnection openConnection(URL url) throws IOException
URL in
the file systemopenConnection in class URLStreamHandlerurl - URL The URL to which the connection is pointing toIOException - if an I/O error occurs during opening the connection.public URLConnection openConnection(URL url, Proxy proxy) throws IOException
proxy is not used in FileURLConnection.openConnection in class URLStreamHandlerurl - the URL which the connection is pointing toproxy - ProxyIOException - if this handler fails to establish a connection.IllegalArgumentException - if the url argument is null.UnsupportedOperationException - if the protocol handler doesn't support this method.protected void parseURL(URL url, String spec, int start, int end)
stringstr into URL u which
already have the context properties. The string generally have the
following format: /c:/windows/win.ini .parseURL in class URLStreamHandlerurl - The URL object that's parsed intospec - The string equivalent of the specification URLstart - The index in the spec string from which to begin parsingend - The index to stop parsingURLStreamHandler.toExternalForm(URL),
URL