KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibm > webdav > protocol > http > Handler


1 package com.ibm.webdav.protocol.http;
2
3 /*
4  * (C) Copyright IBM Corp. 2000 All rights reserved.
5  *
6  * The program is provided "AS IS" without any warranty express or
7  * implied, including the warranty of non-infringement and the implied
8  * warranties of merchantibility and fitness for a particular purpose.
9  * IBM will not be liable for any damages suffered by you as a result
10  * of using the Program. In no event will IBM be liable for any
11  * special, indirect or consequential damages or lost profits even if
12  * IBM has been advised of the possibility of their occurrence. IBM
13  * will not be liable for any third party claims against you.
14  */

15
16
17 import java.io.*;
18 import java.net.*;
19
20 /** open an http input stream given a URL */
21 public class Handler extends sun.net.www.protocol.http.Handler {
22    protected String JavaDoc proxy;
23    protected int proxyPort;
24
25    public Handler () {
26       proxy = null;
27       proxyPort = -1;
28    }
29    public Handler (String JavaDoc proxy, int port) {
30       this.proxy = proxy;
31       this.proxyPort = port;
32    }
33    protected java.net.URLConnection JavaDoc openConnection(URL u)
34    throws IOException {
35       return new WebDAVURLConnection(u, this);
36    }
37 }
38
Popular Tags