diff options
| author | Aaron M. Renn <arenn@urbanophile.com> | 1998-12-20 21:09:11 +0000 |
|---|---|---|
| committer | Aaron M. Renn <arenn@urbanophile.com> | 1998-12-20 21:09:11 +0000 |
| commit | ec766c0527577a10d32c7010d766bb4a1faddc89 (patch) | |
| tree | a4b6473ad758656302f5a680442e916e35fb0339 /gnu/java/net/protocol/http/Handler.java | |
| parent | f6d02c63d4c3321864ca42cd934472ac7a87e5d5 (diff) | |
| download | classpath-ec766c0527577a10d32c7010d766bb4a1faddc89.tar.gz | |
Re-checking in in new directory
Diffstat (limited to 'gnu/java/net/protocol/http/Handler.java')
| -rw-r--r-- | gnu/java/net/protocol/http/Handler.java | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/gnu/java/net/protocol/http/Handler.java b/gnu/java/net/protocol/http/Handler.java new file mode 100644 index 000000000..9e79ef5d1 --- /dev/null +++ b/gnu/java/net/protocol/http/Handler.java @@ -0,0 +1,79 @@ +/************************************************************************* +/* Handler.java -- HTTP protocol handler for java.net +/* +/* Copyright (c) 1998 Free Software Foundation, Inc. +/* Written by Aaron M. Renn (arenn@urbanophile.com) +/* +/* This library is free software; you can redistribute it and/or modify +/* it under the terms of the GNU Library General Public License as published +/* by the Free Software Foundation, either version 2 of the License, or +/* (at your option) any later verion. +/* +/* This library 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 Library General Public License for more details. +/* +/* You should have received a copy of the GNU Library General Public License +/* along with this library; if not, write to the Free Software Foundation +/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA +/*************************************************************************/ + +package gnu.java.net.protocol.http; + +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 + */ + +/** + * 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)); +} + +} // class Handler + |
