// 保存图片到手机端
public static boolean saveNetImage(String url, String destPath)
{
try
{
FileOutputStream fos = new FileOutputStream(destPath);
InputStream is = new URL(url).openStream();
int data = is.read();
while (data != -1)
{
fos.write(data);
data = is.read();
}
is.close();
fos.close();
return true;
} catch (IOException e)
{
e.printStackTrace();
return false;
}
}
保存网络图片到手机上
最新推荐文章于 2019-08-16 14:22:22 发布