URL求救!!!

03-09-22 helldogs

问题是这样的

有这样的一个URL:http://192.168.0.144/?dd=1234

我要调用这个URL

下面是我的调用程序

URL u = new URL(“http://192.168.0.144/?dd=1234”);

InputStream in = new BufferedInputStream(u.openStream());

DataInputStream out = new DataInputStream(in);

String strfind = null;

while((strfind=out.readLine())!=null) {

if(strfind.indexOf("ok")!=-1){

return true;

}

}

当我调用时就会抛出错误

at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:818)

at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)

at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:816)

at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:624)

说是解析HTTPHeader错误?大家帮我解决一下???

谢谢!!!