publicbyte[]request(StringurlString){URLurl=null;Filefile=null;try{url=newURL(urlString);URLConnectionconn=url.openConnection();conn.setDoOutput(true);conn.setDoInput(true);conn.setRequestProperty("content-type","binary/data");// binary/data is keyInputStreamin=conn.getInputStream();// read InputStream from networkfile=newFile("name.zip");FileOutputStreamout=newFileOutputStream(file);// OutputStream as filebyte[]b=newbyte[2048];intcount;while((count=in.read(b))>0){out.write(b,0,count);}out.close();in.close();}catch(IOExceptione){}}