home *** CD-ROM | disk | FTP | other *** search
- package sun.net.www.protocol.ftp;
-
- import java.io.IOException;
- import java.net.URL;
- import java.net.URLConnection;
- import java.net.URLStreamHandler;
- import sun.net.ftp.FtpClient;
- import sun.net.www.protocol.http.HttpURLConnection;
-
- public final class Handler extends URLStreamHandler {
- protected int getDefaultPort() {
- return 21;
- }
-
- protected boolean equals(URL var1, URL var2) {
- String var3 = var1.getUserInfo();
- String var4 = var2.getUserInfo();
- return super.equals(var1, var2) && (var3 == null ? var4 == null : var3.equals(var4));
- }
-
- protected URLConnection openConnection(URL var1) throws IOException {
- if (FtpClient.getUseFtpProxy()) {
- String var2 = FtpClient.getFtpProxyHost();
- if (var2 != null && var2.length() > 0) {
- return new HttpURLConnection(var1, var2, FtpClient.getFtpProxyPort());
- }
- }
-
- return new FtpURLConnection(var1);
- }
- }
-