Android 文件下载
String url = Config.ImagePath + UserInfoSP.getHeaderImageUrl(mcontext);
String path = MainActivity.this.getFilesDir().getAbsolutePath() + File.separator + SAVE_IMG_DIR + "/1.jpg";
new Thread(new Runnable() {
@Override
public void run() {
File file = null;
try {
file = Glide.with(MainActivity.this)
.load(url)
.downloadOnly(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.get();
} catch (ExecutionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
if (file!=null){
FileUtil.copy(fi