可以用该类制作下载器:URLConnection urlConnection = downloadURL.openConnection();
int fileSize = urlConnection.getContentLength(); //文件大小
if(fileSize==-1){
throw new FileNotFoundException("下载地址错误");
}
InputStream in = new BufferInputStream(urlConnection.getInputStream());//创建一个缓冲区数组
int fileSize = urlConnection.getContentLength(); //文件大小
if(fileSize==-1){
throw new FileNotFoundException("下载地址错误");
}
InputStream in = new BufferInputStream(urlConnection.getInputStream());//创建一个缓冲区数组
异常输出:java.net.MalformedURLException: unknown protocol: mms
http://www.java2s.com/Open-Source/Java/6.0-JDK-Modules/j2me/com/sun/mmedia/rtsp/RtspUrl.java.htm