package net.sonyhome.net;
import Java.io.*;
import java.net.*;
import java.util.*;
import java.text.*;
/**
* 一个用来访问http服务器的东西。功能类似于java.net中的那个。但要强,这个对Post方法的支持更好。
* 其实也不能说是我写的。不记得从哪儿找来的程序,稍事修改了一下。所以现在程序的结构都忘啦。
* 不过有一点是肯定的,那就是可以用。呵呵。
* 去年我做的Java版的精华区就是用这个类来访问的。
* Creation date: (2001-8-24 23:57:14)
* @author: SonyMusic
*/
public class HttpConnection {
private URL url = null;
//private boolean doInput = true;
//private boolean doOutput = true;
private boolean usePost = false;
private boolean useCaches = false;
private Vector reqHeaderNames = new Vector();
private Vector reqHeaderValues = new Vector();
private Vector resHeaderNames = null;
private Vector resHeaderValues = null;
private Socket socket = null;
private OutputStream out = null;
private InputStream in = null;
private boolean useHttp11 = false;
private boolean connected = false;
private boolean inputStarted = false;
Hashtable postData = new Hashtable();
Hashtable getData = new Hashtable();
/**
* HttpConnection constrUCtor comment.
*/
public HttpConnection(URL url) {
super();
this.url = url;
}
/**
* Insert the method's description here.
* Creation date: (2001-8-25 1:16:52)
* @param name java.lang.String
* @param value java.lang.String
*/
public void addGet(String name, String value) {
getData.put(name, value);
}
/**
* Insert the method's description here.
* Creation date: (2001-8-25 1:16:52)