可以用该类制作下载器:
URLConnection urlConnection = downloadURL.openConnection();
int fileSize = urlConnection.getContentLength(); //文件大小
if(fileSize==-1){
throw new FileNotFoundException("下载地址错误");
}
InputStream in = new BufferInputStream(urlConnection.getInputStream());//创建一个缓冲区数组