public void twrInJava6(URL url){
        InputStream is = null;
        try{
            File file = new File("");
            is = url.openStream();
            OutputStream out = new FileOutputStream(file);
            try{
                byte[] buf = new byte[4096];
                int len;
                while((len = is.read()) >= 0){
                    out.write(buf,0,len);
                }
            }catch (IOException e) {
                e.printStackTrace();
            }finally {
                out.close();
            }
        }catch (FileNotFoundException e){

        }
        catch (IOException e) {
            e.printStackTrace();
        }finally {
            if (is == null) {
                try {
                    is.close();
                } catch (IOException e) {

                }
            }
        }
    }