APIdia Launch Partner
Top Description Constructors Methods
sun.net.www.protocol.ftp

public Class Handler

extends URLStreamHandler
Class Inheritance
Imports
java.io.IOException, java.net.MalformedURLException, .URL, .Proxy, java.util.Objects

open an ftp connection given a URL

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
equals(URL u1, URL u2)

Overrides java.net.URLStreamHandler.equals.

Provides the default equals calculation.

protected int
getDefaultPort()

Overrides java.net.URLStreamHandler.getDefaultPort.

Returns the default port for a URL parsed by this handler.

protected URLConnection
openConnection(URL u)

Implements abstract java.net.URLStreamHandler.openConnection.

Opens a connection to the object referenced by the URL argument.

protected URLConnection
openConnection(URL u, Proxy proxy)

Overrides java.net.URLStreamHandler.openConnection.

Same as openConnection(URL), except that the connection will be made through the specified proxy; Protocol handlers that do not support proxying will ignore the proxy parameter and make a normal connection.

Inherited from java.net.URLStreamHandler:
getHostAddresshashCodehostsEqualparseURLsameFilesetURLsetURLtoExternalForm

Constructor Detail

Handlerback to summary
public Handler()

Method Detail

equalsback to summary
protected boolean equals(URL u1, URL u2)

Overrides java.net.URLStreamHandler.equals.

Doc from java.net.URLStreamHandler.equals.

Provides the default equals calculation. May be overridden by handlers for other protocols that have different requirements for equals(). This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called by java.net.URL class.

getDefaultPortback to summary
protected int getDefaultPort()

Overrides java.net.URLStreamHandler.getDefaultPort.

Doc from java.net.URLStreamHandler.getDefaultPort.

Returns the default port for a URL parsed by this handler. This method is meant to be overridden by handlers with default port numbers.

openConnectionback to summary
protected URLConnection openConnection(URL u) throws IOException

Implements abstract java.net.URLStreamHandler.openConnection.

Doc from java.net.URLStreamHandler.openConnection.

Opens a connection to the object referenced by the URL argument. This method should be overridden by a subclass.

If for the handler's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned, and for JAR a JarURLConnection will be returned.

Exceptions
IOException:
if an I/O error occurs while opening the connection.
openConnectionback to summary
protected URLConnection openConnection(URL u, Proxy proxy) throws IOException

Overrides java.net.URLStreamHandler.openConnection.

Doc from java.net.URLStreamHandler.openConnection.

Same as openConnection(URL), except that the connection will be made through the specified proxy; Protocol handlers that do not support proxying will ignore the proxy parameter and make a normal connection.

Calling this method preempts the system's default ProxySelector settings.

Exceptions
IOException:
if an I/O error occurs while opening the connection.