--- /home/tromey/gnu/Nightly/classpath/classpath/gnu/java/net/protocol/http/Handler.java 2004-12-01 02:20:33.000000000 -0700 +++ gnu/java/net/protocol/http/Handler.java 2003-10-19 02:20:54.000000000 -0600 @@ -1,5 +1,5 @@ -/* Handler.java -- - Copyright (C) 2004 Free Software Foundation, Inc. +/* Handler.java -- HTTP protocol handler for java.net + Copyright (c) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -7,7 +7,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -35,7 +35,6 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package gnu.java.net.protocol.http; import java.io.IOException; @@ -44,30 +43,44 @@ import java.net.URLStreamHandler; /** - * An HTTP URL stream handler. + * 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 Chris Burdess (dog@gnu.org) + * @author Aaron M. Renn (arenn@urbanophile.com) + * @author Warren Levy + * @author Anthony Green */ -public class Handler - extends URLStreamHandler +public class Handler extends URLStreamHandler { - /** - * Returns the default HTTP port (80). + * A do nothing constructor */ - protected int getDefaultPort() + public Handler() { - return HTTPConnection.HTTP_PORT; } /** - * Returns an HTTPURLConnection for the given URL. + * 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 */ - public URLConnection openConnection(URL url) - throws IOException + protected URLConnection openConnection (URL url) throws IOException { - return new HTTPURLConnection(url); + return new Connection (url); } -} + /** + * Returns the default port for a URL parsed by this handler. + */ + protected int getDefaultPort() + { + return 80; + } +} // class Handler