解决方案
10
获得图片,然后用FileoutputStream写入到文件……
10
先用htturlconnection(或其他方法也行)从服务器获得inputstream,然后再同过outputstream写入本地文件
10
你是想要直接要源码的吧,建议还是问google吧,就算给你了,你也需要修改的,这不就是更新下载么
50
20
URL url = new URL(path);
URLConnection con = url.openConnection();
InputStream input = con.getInputStream();
int len ;
byte[] buf = new byte[1024];
FileOutputStream output = new FileOutputStream(new File(phonePath));
while((len = input.read(buf)) != -1)
{output.write(buf,0,len);}
output.close();
input.close();
URLConnection con = url.openConnection();
InputStream input = con.getInputStream();
int len ;
byte[] buf = new byte[1024];
FileOutputStream output = new FileOutputStream(new File(phonePath));
while((len = input.read(buf)) != -1)
{output.write(buf,0,len);}
output.close();
input.close();