锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国精品产品一区,蜜臀久久99精品久久久久久9,国产美女一区二区三区http://www.aygfsteel.com/lillian1205/category/41910.htmlzh-cnFri, 23 Oct 2009 05:39:59 GMTFri, 23 Oct 2009 05:39:59 GMT60澶嶅埗鏂囦歡http://www.aygfsteel.com/lillian1205/articles/299173.htmllillianlillianWed, 21 Oct 2009 03:28:00 GMThttp://www.aygfsteel.com/lillian1205/articles/299173.htmlhttp://www.aygfsteel.com/lillian1205/comments/299173.htmlhttp://www.aygfsteel.com/lillian1205/articles/299173.html#Feedback0http://www.aygfsteel.com/lillian1205/comments/commentRss/299173.htmlhttp://www.aygfsteel.com/lillian1205/services/trackbacks/299173.html// 婧愭枃浠跺す 
    static String url1 = "c:\\riss";
    
// 鐩爣鏂囦歡澶?nbsp;
    static String url2 = "c:/d";

    
public  static void copy() throws IOException {
        
// 鍒涘緩鐩爣鏂囦歡澶?nbsp;
        (new File(url2)).mkdirs();
        
// 鑾峰彇婧愭枃浠跺す褰撳墠涓嬬殑鏂囦歡鎴栫洰褰?nbsp;
        File[] file = (new File(url1)).listFiles();
        
for (int i = 0; i < file.length; i++{
            
if (file[i].isFile()) {
                
// 澶嶅埗鏂囦歡 
                copyFile(file[i], new File(url2 + file[i].getName()));
            }

            
if (file[i].isDirectory()) {
                
// 澶嶅埗鐩綍 
                String sourceDir = url1 + File.separator + file[i].getName();
                String targetDir 
= url2 + File.separator + file[i].getName();
                copyDirectiory(sourceDir, targetDir);
            }

        }

    }


    
// 澶嶅埗鏂囦歡 
    public static void copyFile(File sourceFile, File targetFile)
            
throws IOException {
        
// 鏂板緩鏂囦歡杈撳叆嫻佸茍瀵瑰畠榪涜緙撳啿 
        FileInputStream input = new FileInputStream(sourceFile);
        BufferedInputStream inBuff 
= new BufferedInputStream(input);

        
// 鏂板緩鏂囦歡杈撳嚭嫻佸茍瀵瑰畠榪涜緙撳啿 
        FileOutputStream output = new FileOutputStream(targetFile);
        BufferedOutputStream outBuff 
= new BufferedOutputStream(output);

        
// 緙撳啿鏁扮粍 
        byte[] b = new byte[1024 * 5];
        
int len;
        
while ((len = inBuff.read(b)) != -1{
            outBuff.write(b, 
0, len);
        }

        
// 鍒鋒柊姝ょ紦鍐茬殑杈撳嚭嫻?nbsp;
        outBuff.flush();

        
//鍏抽棴嫻?nbsp;
        inBuff.close();
        outBuff.close();
        output.close();

    }


    
//澶嶅埗鏂囦歡澶?nbsp;
    public static void copyDirectiory(String sourceDir, String targetDir)
            
throws IOException {
        
// 鏂板緩鐩爣鐩綍 
        (new File(targetDir)).mkdirs();
        
// 鑾峰彇婧愭枃浠跺す褰撳墠涓嬬殑鏂囦歡鎴栫洰褰?nbsp;
        File[] file = (new File(sourceDir)).listFiles();
        
for (int i = 0; i < file.length; i++{
            
if (file[i].isFile()) {
                
// 婧愭枃浠?nbsp;
                File sourceFile = file[i];
                
// 鐩爣鏂囦歡 
                File targetFile = new File(new File(targetDir)
                        .getAbsolutePath()
                        
+ File.separator + file[i].getName());
                copyFile(sourceFile, targetFile);
            }

            
if (file[i].isDirectory()) {
                
// 鍑嗗澶嶅埗鐨勬簮鏂囦歡澶?nbsp;
                String dir1 = sourceDir + "/" + file[i].getName();
                
// 鍑嗗澶嶅埗鐨勭洰鏍囨枃浠跺す 
                String dir2 = targetDir + "/" + file[i].getName();
                copyDirectiory(dir1, dir2);
            }

        }

    }



lillian 2009-10-21 11:28 鍙戣〃璇勮
]]>
java.util.TimerTask 鍜?Timer 瀹氭湡鎵ц浠誨姟http://www.aygfsteel.com/lillian1205/articles/296904.htmllillianlillianTue, 29 Sep 2009 07:40:00 GMThttp://www.aygfsteel.com/lillian1205/articles/296904.htmlhttp://www.aygfsteel.com/lillian1205/comments/296904.htmlhttp://www.aygfsteel.com/lillian1205/articles/296904.html#Feedback0http://www.aygfsteel.com/lillian1205/comments/commentRss/296904.htmlhttp://www.aygfsteel.com/lillian1205/services/trackbacks/296904.html闃呰鍏ㄦ枃

lillian 2009-09-29 15:40 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 濉溪县| 道真| 库尔勒市| 嘉定区| 本溪市| 三原县| 仙游县| 阜宁县| 贡觉县| 新巴尔虎右旗| 洪江市| 澄城县| 嘉荫县| 偃师市| 双桥区| 久治县| 鹿泉市| 五寨县| 浑源县| 武夷山市| 台江县| 高州市| 巨野县| 石台县| 三河市| 蓝田县| 衡阳县| 兰考县| 莎车县| 济阳县| 呼伦贝尔市| 治多县| 太仓市| 三台县| 巴里| 新泰市| 广宁县| 故城县| 北宁市| 井冈山市| 方城县|