String src="http://192.168.1.106/football.3gp";
String des="sdcard/temp1357.3gp";
InputStream in = null;
OutputStream out = null;
try{
in = new BufferedInputStream(new URL(src).openStream());
out = new BufferedOutputStream(new FileOutputStream(des));
int read;
while(true){
read = in.read();
if(read == -1) break;
out.write(read);
}
in.close();
out.close();
finish();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
System.out.println("aa");
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("bb");
} finally {
if (in != null)
try {
System.out.println("cc");
in.close();
} catch (IOException e) {
System.out.println("dd");
// TODO Auto-generated catch block
}
if (out != null)
try {
out.close();
} catch (IOException e) {
// TODO Auto-generated catch block
}
}