diff options
| author | Michael Koch <konqueror@gmx.de> | 2003-10-18 09:12:37 +0000 |
|---|---|---|
| committer | Michael Koch <konqueror@gmx.de> | 2003-10-18 09:12:37 +0000 |
| commit | d30467dc028976faf72f71a33e2b08a1058fc0db (patch) | |
| tree | 6c5d85655a63c59b03846e7b2356ef5da8cd1ae8 /gnu/java/net/protocol/http/Handler.java | |
| parent | 35caa0474579565f118efb6087e1465015c6c33b (diff) | |
| download | classpath-d30467dc028976faf72f71a33e2b08a1058fc0db.tar.gz | |
2003-10-18 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Handler.java,
gnu/java/net/protocol/http/Handler.java,
gnu/java/net/protocol/jar/Handler.java:
Reformated.
Diffstat (limited to 'gnu/java/net/protocol/http/Handler.java')
| -rw-r--r-- | gnu/java/net/protocol/http/Handler.java | 94 |
1 files changed, 37 insertions, 57 deletions
diff --git a/gnu/java/net/protocol/http/Handler.java b/gnu/java/net/protocol/http/Handler.java index a9a04d855..3a5d0221f 100644 --- a/gnu/java/net/protocol/http/Handler.java +++ b/gnu/java/net/protocol/http/Handler.java @@ -1,5 +1,5 @@ /* Handler.java -- HTTP protocol handler for java.net - Copyright (c) 1998 Free Software Foundation, Inc. + Copyright (c) 1998, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -37,68 +37,48 @@ exception statement from your version. */ package gnu.java.net.protocol.http; +import java.io.IOException; import java.net.URL; import java.net.URLStreamHandler; import java.net.URLConnection; -import java.io.IOException; /** - * This is the protocol handler for the HTTP protocol. It implements - * the abstract openConnection() method from URLStreamHandler by returning - * a new HttpURLConnection object (from this package). All other - * methods are inherited - * - * @version 0.1 - * - * @author Aaron M. Renn (arenn@urbanophile.com) - */ -public class Handler extends URLStreamHandler -{ - -/*************************************************************************/ - -/* - * Constructors + * This is the protocol handler for the HTTP protocol. It implements + * the abstract openConnection() method from URLStreamHandler by returning + * a new HttpURLConnection object (from this package). All other + * methods are inherited + * + * @author Aaron M. Renn (arenn@urbanophile.com) */ - -/** - * A do nothing constructor - */ -public -Handler() -{ - ; -} - -/*************************************************************************/ - -/* - * Instance Methods - */ - -/** - * This method returs a new HttpURLConnection for the specified URL - * - * @param url The URL to return a connection for - * - * @return The URLConnection - * - * @exception IOException If an error occurs - */ -protected URLConnection -openConnection(URL url) throws IOException -{ - return(new gnu.java.net.protocol.http.HttpURLConnection(url)); -} - - -/** - * Returns the default port for a URL parsed by this handler. - */ -protected int getDefaultPort () +public class Handler extends URLStreamHandler { - return 80; -} + /** + * A do nothing constructor + */ + public Handler() + { + } + + /** + * This method returs a new HttpURLConnection for the specified URL + * + * @param url The URL to return a connection for + * + * @return The URLConnection + * + * @exception IOException If an error occurs + */ + protected URLConnection openConnection (URL url) throws IOException + { + return new gnu.java.net.protocol.http.HttpURLConnection (url); + } + + /** + * Returns the default port for a URL parsed by this handler. + */ + protected int getDefaultPort() + { + return 80; + } } // class Handler - |
