使用URL及HttpURLConnection的示例如下,自己未整理的代码,忘见谅
还有其它方式,可以google一下... codeFos = new FileOutputStream(codeResourcesFile);
url = new URL(
"http://xml.sodino.com:8118/ApkAppend/Code.setting");
httpConn = (HttpURLConnection) url.openConnection();
httpConn.setDoInput(true);
is = httpConn.getInputStream();
while ((read = is.read()) != -1) {
codeFos.write(read);
}
还有其它方式,可以google一下... codeFos = new FileOutputStream(codeResourcesFile);
url = new URL(
"http://xml.sodino.com:8118/ApkAppend/Code.setting");
httpConn = (HttpURLConnection) url.openConnection();
httpConn.setDoInput(true);
is = httpConn.getInputStream();
while ((read = is.read()) != -1) {
codeFos.write(read);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货