1 |
/* |
/* |
2 |
* $Id$ |
* Handler.java |
3 |
* Copyright (C) 2004 The Free Software Foundation |
* Copyright (C) 2004 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 HTTP URL stream handler. |
* An HTTP 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 () |
/** |
56 |
|
* Returns the default HTTP port (80). |
57 |
|
*/ |
58 |
|
protected int getDefaultPort() |
59 |
{ |
{ |
60 |
return HTTPConnection.HTTP_PORT; |
return HTTPConnection.HTTP_PORT; |
61 |
} |
} |
62 |
|
|
63 |
/** |
/** |
64 |
* Returns an FTPURLConnection for the given URL. |
* Returns an HTTPURLConnection for the given URL. |
65 |
*/ |
*/ |
66 |
public URLConnection openConnection (URL url) |
public URLConnection openConnection(URL url) |
67 |
throws IOException |
throws IOException |
68 |
{ |
{ |
69 |
return new HTTPURLConnection (url); |
return new HTTPURLConnection(url); |
70 |
} |
} |
71 |
|
|
72 |
} |
} |
73 |
|
|