你可以用下面的方法把数据读过来,然后弹出对话框,要求保存或打开,保存就直接写文件,执行就RunTime调用外部命令来做。
urlPath = "http://www.csdn.net" ;
try{
url= new URL(urlPath) ; InputStream input = url.openStream() ;
dis = new BufferedReader(new InputStreamReader(input)); char buf[] = new char[51888];
int readBytes = dis.read(readBuf) ;
}
catch(Exception e)
{
System.out.println(" Exception: " + e.toString() ) ;
}
urlPath = "http://www.csdn.net" ;
try{
url= new URL(urlPath) ; InputStream input = url.openStream() ;
dis = new BufferedReader(new InputStreamReader(input)); char buf[] = new char[51888];
int readBytes = dis.read(readBuf) ;
}
catch(Exception e)
{
System.out.println(" Exception: " + e.toString() ) ;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货