输出到文件用FileOutputStream好一些:
...
URL url=new URL ("http://。。/zip.exe");
HttpURLConnection httpCon=(HttpURLConnection)url.openConnection();
httpCon.setRequestProperty ("User-Agent","NetFox");
httpCon.setRequestProperty ("RANGE","bytes=0");
InputStream input=httpCon.getInputStream ();
OutputStream out = new FileOutputStream("c:\\zip.exe");
byte[] b=new byte [4096];
int count;
while((count=input.read (b,0,4096))>0)
    out.write(b, 0, count);
out.close();
input.close();
...