Class FtpHandler

    • Constructor Detail

      • FtpHandler

        public FtpHandler()
    • Method Detail

      • openConnection

        protected URLConnection openConnection​(URL u)
                                        throws IOException
        Open a URLConnection on the given URL.
        Specified by:
        openConnection in class URLStreamHandler
        Parameters:
        u - the URL to the resource where a connection has to be opened.
        Returns:
        the opened URLConnection to the specified resource.
        Throws:
        IOException - if an I/O error occurs during opening the connection.
      • openConnection

        protected URLConnection openConnection​(URL url,
                                               Proxy proxy)
                                        throws IOException
        Returns a connection, which is established via the proxy, to the FTP server specified by this URL. If proxy is DIRECT type, the connection is made in normal way.
        Overrides:
        openConnection in class URLStreamHandler
        Parameters:
        url - the URL which the connection is pointing to
        proxy - the proxy which is used to make the connection
        Returns:
        a connection to the resource pointed by this url.
        Throws:
        IOException - if this handler fails to establish a connection.
        IllegalArgumentException - if any argument is null or the type of proxy is wrong.
        UnsupportedOperationException - if the protocol handler doesn't support this method.