URL url=new URL("http://localhost:8080/forum/file/test.txt");
URLConnection uc=url.openConnection();//设一下
uc.setDoOutput( true );
uc.setDoInput( true );
uc.setUseCaches( false );
PrintWriter pw=new PrintWriter(uc.getOutputStream()); //最好改为
BufferedOutputStream pw = new BufferedOutputStream(uc.getOutputStream());pw.write("hello!!!!");
pw.flush();
URLConnection uc=url.openConnection();//设一下
uc.setDoOutput( true );
uc.setDoInput( true );
uc.setUseCaches( false );
PrintWriter pw=new PrintWriter(uc.getOutputStream()); //最好改为
BufferedOutputStream pw = new BufferedOutputStream(uc.getOutputStream());pw.write("hello!!!!");
pw.flush();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货