common_helper/src/main/java/com/xiongyingqi/util/FileHelper.java
public static File readURL(String urlStr) throws IOException {
        URL url = new URL(urlStr);
        // System.out.println(" ----------------- url ----------------- ");
        // System.out.println(urlStr);
        // System.out.println(url.getPath());
        // System.out.println(url.getHost());
        // System.out.println(" ---------------------------------- ");
        InputStream inputStream = null;
        if (url.getHost().trim().equals("")) {
            // inputStream = new FileInputStream(url.getFile());
            File file = new File(url.getFile());
            return file;
        } else {
            inputStream = url.openStream();
        }
        return readInputStream(inputStream);
    }
public static File readURL(String urlStr) throws IOException {
        URL url = new URL(urlStr);
        // System.out.println(" ----------------- url ----------------- ");
        // System.out.println(urlStr);
        // System.out.println(url.getPath());
        // System.out.println(url.getHost());
        // System.out.println(" ---------------------------------- ");
        InputStream inputStream = null;
        if (url.getHost().trim().equals("")) {
            // inputStream = new FileInputStream(url.getFile());
            File file = new File(url.getFile());
            return file;
        } else {
            inputStream = url.openStream();
        }
        return readInputStream(inputStream);
    }
从url地址读取文件信息并写入到临时文件 <br>
2013-9-2 下午2:57:15

@param urlStr
@return
@throws java.io.IOException