1 |
/* |
/* |
2 |
* $Id$ |
* Handler.java |
3 |
* Copyright (C) 2003 The Free Software Foundation |
* Copyright (C) 2003 The Free Software Foundation |
4 |
* |
* |
5 |
* This file is part of GNU inetlib, a library. |
* This file is part of GNU inetlib, a library. |
47 |
* An FTP URL stream handler. |
* An FTP URL stream handler. |
48 |
* |
* |
49 |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
|
* @version $Revision$ $Date$ |
|
50 |
*/ |
*/ |
51 |
public class Handler extends URLStreamHandler |
public class Handler |
52 |
|
extends URLStreamHandler |
53 |
{ |
{ |
54 |
|
|
55 |
protected int getDefaultPort () |
protected int getDefaultPort() |
56 |
{ |
{ |
57 |
return FTPConnection.FTP_PORT; |
return FTPConnection.FTP_PORT; |
58 |
} |
} |
59 |
|
|
60 |
/** |
/** |
61 |
* Returns an FTPURLConnection for the given URL. |
* Returns an FTPURLConnection for the given URL. |
62 |
*/ |
*/ |
63 |
public URLConnection openConnection (URL url) throws IOException |
public URLConnection openConnection(URL url) |
64 |
{ |
throws IOException |
65 |
return new FTPURLConnection (url); |
{ |
66 |
} |
return new FTPURLConnection(url); |
67 |
|
} |
68 |
|
|
69 |
} |
} |
70 |
|
|