这里是源程序:
   import java.io.*;
import java.net.*;public class SendForm
{
InputStream in;

BufferedReader br;
OutputStream out;
Socket s;
URL url;
File f;
FileWriter fout;
int i;
byte [] b;
String str;

public SendForm()
{
try
{
url=new URL("http://bbs.pdafans.com");
s=new Socket(url.getHost(),80);
in=s.getInputStream();
out=s.getOutputStream();
br=new BufferedReader(new InputStreamReader(in),);
f=new File("F:/readhtml.html");
fout=new FileWriter(f,true);

}catch(Exception e)
{
e.printStackTrace();
System.out.println("can not connect to the URL you specified.");
}
}
public void send()
{
try{

writeString("POST /logging.php?action=login& HTTP/1.1");
writeString("Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*");
writeString("Referer: http://bbs.pdafans.com/logging.php?action=login");
writeString("Accept-Language: zh-cn");
writeString("Content-Type: application/x-www-form-urlencoded");
writeString("Accept-Encoding: gzip, deflate");
writeString("User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
writeString("Host: bbs.pdafans.com");
writeString("Content-Length: 189");
writeString("Connection: Keep-Alive");
writeString("Cache-Control: no-cache");
    
writeString("");
writeString("formhash=3bd8bc0a&referer=index.php&loginfield=username&username=qweuro&password=456423&questionid=0&answer=&cookietime=315360000&loginmode=&styleid=&loginsubmit=提   交");
writeString("");
while((str=br.readLine())!=null)
{
fout.write(str);
}
fout.flush();

}catch(Exception ee)
{
System.out.println("can not read or write.");
    ee.printStackTrace();
}
finally
{
if ( out!=null ) {
        try {
          out.close();
        } catch ( Exception e ) {
        }
      }      if ( in!=null ) {
        try {
          in.close();
        } catch ( Exception e ) {
        }
      }      if ( s!=null ) {
        try {
          s.close();
        } catch ( Exception e ) {
        }
      }
       if ( fout!=null ) {
        try {
          fout.close();
        } catch ( Exception e ) {
        }
}
}
}
public void writeString(String s)throws IOException
{

out.write(s.getBytes());
out.write("\r\n".getBytes());
}
public static void main(String [] args)
{
new SendForm().send();
}


}
求大侠解答。