Java tutorial
//package com.java2s; import java.io.File; import android.util.Log; public class Main { static String tag = "FileUtilsDonggu"; public static String isFileDownloaded(String filename, int contentlen) { Log.i(tag, "filename:" + filename); Log.i(tag, "len:" + contentlen); File f = new File(filename); if (!f.exists()) { return "init"; } Log.i(tag, "f.length():" + f.length()); if (f.length() < contentlen) { return "downloading"; } if (f.length() == contentlen) { return "finished"; } return "error"; } }