亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? onewaysync.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/util/wanderer/OneWaySync.java,v $// $RCSfile: OneWaySync.java,v $// $Revision: 1.1.2.2 $// $Date: 2005/08/09 18:42:05 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.util.wanderer;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.util.Iterator;import java.util.LinkedList;import com.bbn.openmap.util.ArgParser;import com.bbn.openmap.util.Debug;/** * The OneWaySync is a class that copies files from one directory to * another, skipping specified extensions or only copying files and * directories with specified extensions. It's used by the OpenMap * team to keep the internal CVS tree in sync with the external one. * The main() function has the avoid/limit suffixes hard-coded, you * can extend or change the settings in a different class. */public class OneWaySync extends Wanderer implements WandererCallback {    /** The source directory. */    protected File src;    /** The target directory. */    protected File tgt;    /** The suffixes to skip over for directories. */    public String[] dirSuffixAvoids = null;    /** The suffixes to skip over for files. */    public String[] fileSuffixAvoids = null;    /** The suffixes to limit copying to for directories. */    public String[] dirSuffixLimits = null;    /** The suffixes to limit copying to for files. */    public String[] fileSuffixLimits = null;    /** The list of stuff skipped over. */    protected LinkedList notCopiedList = new LinkedList();    /** Flag for printing out activities. */    protected boolean verbose = false;    /** Flag for not doing the changes, just saying what would happen. */    protected boolean fakeit = false;    /** Flag to not have files that exist overwritten. */    protected boolean overwrite = true;    public OneWaySync(String srcDirName, String targetDirName) {        super();        setCallback(this);        src = new File(srcDirName);        tgt = new File(targetDirName);    }    /**     * Check to see if a source directory name should be skipped,     * based on the avoid and limit list.     */    protected boolean checkToSkipDirectory(String name) {        if (dirSuffixAvoids != null) {            for (int i = 0; i < dirSuffixAvoids.length; i++) {                if (name.endsWith(dirSuffixAvoids[i])) {                    // Was on avoid list, skip it.                    return true;                }            }        }        if (dirSuffixLimits != null) {            for (int i = 0; i < dirSuffixLimits.length; i++) {                if (name.endsWith(dirSuffixLimits[i])) {                    return false;                }            }            // Wasn't on limit list, skip it.            return true;        }        return false;    }    /**     * Check to see if a source file name should be skipped, based on     * the avoid and limit list.     */    protected boolean checkToSkipFile(String name) {        if (fileSuffixAvoids != null) {            for (int i = 0; i < fileSuffixAvoids.length; i++) {                if (name.endsWith(fileSuffixAvoids[i])) {                    // Was on avoid list, skip it.                    return true;                }            }        }        if (fileSuffixLimits != null) {            for (int i = 0; i < fileSuffixLimits.length; i++) {                if (name.endsWith(fileSuffixLimits[i])) {                    return false;                }            }            // Wasn't on limit list, skip it.            return true;        }        return false;    }    /**     * Wanderer method handing directories.     */    public void handleDirectory(File directory, String[] contentNames) {        String newDirName = getRelativePathFromSource(directory);        if (newDirName == null) {            if (directory != src) {                notCopiedList.add(directory);            }            super.handleDirectory(directory, contentNames);            return;        }        if (!checkToSkipDirectory(newDirName)) {            File newDir = getTargetFile(newDirName);            if (!newDir.exists()) {                if (verbose)                    Debug.output("Creating " + newDir);                if (!fakeit && overwrite)                    newDir.mkdir();            }            super.handleDirectory(directory, contentNames);        } else {            notCopiedList.add(directory);        }    }    /**     * WandererCallback method handing directories, not used.     */    public void handleDirectory(File file) {}    /**     * WandererCallback method handing files, check and copy those     * that fit the avoid and limit parameters.     */    public void handleFile(File file) {        String newFileName = getRelativePathFromSource(file);        if (!checkToSkipFile(newFileName)) {            File newFile = getTargetFile(newFileName);            if (verbose)                Debug.output("Copying " + file + " to " + newFile);            if (!fakeit && overwrite)                copy(file, newFile);        } else {            notCopiedList.add(file);        }    }    /**     * Copy files.     */    public void copy(File fromFile, File toFile) {        try {            FileInputStream fis = new FileInputStream(fromFile);            FileOutputStream fos = new FileOutputStream(toFile);            int num = 0;            byte[] stuff = new byte[4096];            while ((num = fis.read(stuff)) > 0) {                fos.write(stuff, 0, num);            }            fis.close();            fos.close();        } catch (IOException ioe) {            Debug.error("Exception reading from " + fromFile                    + " and writing to " + toFile);        }    }    /**     * Strip the source directory part of the path from the file,     * return what remains.     */    public String getRelativePathFromSource(File file) {        return subtractPathFromDirectory(src, file);    }    /**     * Strip the target directory part of the path from the file,     * return what remains.     */    public String getRelativePathFromTarget(File file) {        return subtractPathFromDirectory(tgt, file);    }    /**     * Tack the file path onto the source directory.     */    public File getSourceFile(String relativePath) {        return new File(src, relativePath);    }    /**     * Tack the file path onto the target directory.     */    public File getTargetFile(String relativePath) {        return new File(tgt, relativePath);    }    /**     * Print out the files/directories not copied.     */    public void writeUnsynched() {        for (Iterator it = notCopiedList.iterator(); it.hasNext();) {            Debug.output("  " + it.next());        }    }    /**     * Create a BackCheck object that looks to see what files are in     * the target but not in the source.     */    public void checkTargetSolos() {        new BackCheck(tgt.getPath(), src.getPath());    }    /**     * Take the source directory out of the path to the directory.     */    protected String subtractPathFromDirectory(File dir, File file) {        String name = file.getPath();        String dirName = dir.getPath();        if (name.equals(dirName)) {            if (verbose) {                Debug.output("OneWaySync avoiding subtraction operation on top-level directory");            }            return null;        }        int index = name.indexOf(dirName);        if (index != -1) {            try {                String relative = name.substring(index + dirName.length() + 1);                if (Debug.debugging("sync")) {                    Debug.output("From " + file + ", returning " + relative);                }                return relative;            } catch (StringIndexOutOfBoundsException sioobe) {                Debug.output("Problem clipping first " + (dirName.length() + 1)                        + " characters off " + file);                return null;            }        } else {            Debug.error("File " + file + " is not in directory " + dir);            return null;        }    }    /**     * Start copying files from the source directory to the target     * directory.     */    public void start() {        String errorMessage = null;        if (src == null) {            errorMessage = "OneWaySync:  Source directory unspecified";        } else if (!src.exists()) {            errorMessage = "OneWaySync:  Source directory (" + src                    + ") doesn't exist!";        }        if (tgt != null) {            if (!tgt.exists()) {                if (verbose) {                    Debug.output("OneWaySync:  target directory (" + tgt                            + ") doesn't exist, creating...");                }                try {                    if (!fakeit && !tgt.mkdir()) {                        errorMessage = "OneWaySync:  target directory (" + tgt                                + ") can't be created.";                    }                } catch (SecurityException se) {                    errorMessage = "OneWaySync:  creating target directory ("                            + tgt + ") isn't allowed, Security Exception: "                            + se.getMessage();                    se.printStackTrace();                }            }        } else {            errorMessage = "OneWaySync:  target directory unspecified";        }        if (errorMessage != null) {            Debug.error(errorMessage);            System.exit(0);        }        handleEntry(src);    }    public void setVerbose(boolean val) {        verbose = val;    }    public boolean getVerbose() {        return verbose;    }    public void setFakeit(boolean val) {        fakeit = val;    }    public boolean getFakeit() {        return fakeit;    }    public void setDirSuffixAvoids(String[] avoids) {        dirSuffixAvoids = avoids;    }    public void setFileSuffixAvoids(String[] avoids) {        fileSuffixAvoids = avoids;    }    public void setDirSuffixLimits(String[] limits) {        dirSuffixLimits = limits;    }    public void setFileSuffixLimits(String[] limits) {        fileSuffixLimits = limits;    }    /**     */    public static void main(String[] argv) {        Debug.init();        ArgParser ap = new ArgParser("OneWaySync");        ap.add("source",                "The source directory to copy files and directories from.",                1);        ap.add("target",                "The target directory to receive the updated files and directories.",                1);        ap.add("verbose",                "Announce all changes, failures will still be reported.");        ap.add("fakeit",                "Just print what would happen, don't really do anything.");        ap.add("report",                "Print out what didn't get copied, and what files exist only on the target side.");        if (argv.length < 4) {            ap.bail("", true);        }        ap.parse(argv);        boolean verbose = false;        String[] verb = ap.getArgValues("verbose");        if (verb != null) {            verbose = true;        }        boolean fakeit = false;        verb = ap.getArgValues("fakeit");        if (verb != null) {            verbose = true;            fakeit = true;        }        boolean report = false;        verb = ap.getArgValues("report");        if (verb != null) {            report = true;        }        String[] sourceDir;        sourceDir = ap.getArgValues("source");        if (sourceDir != null || sourceDir.length < 1) {            if (verbose)                Debug.output("Source directory is " + sourceDir[0]);        } else {            ap.bail("OneWaySync needs path to source directory", false);        }        String[] targetDir;        targetDir = ap.getArgValues("target");        if (targetDir != null || targetDir.length < 1) {            if (verbose)                Debug.output("Target directory is " + targetDir[0]);        } else {            ap.bail("OneWaySync needs path to source directory", false);        }        OneWaySync cc = new OneWaySync(sourceDir[0], targetDir[0]);        cc.setVerbose(verbose);        cc.setFakeit(fakeit);        cc.setDirSuffixAvoids(new String[] { "CVS" });        cc.setFileSuffixLimits(new String[] { ".java", "Makefile",                ".cvsignore", ".html", ".properties", ".txt", ".c", ".h" });        cc.start();        if (report) {            Debug.output("-------- Not Copied --------");            cc.writeUnsynched();            Debug.output("----------------------------");            cc.checkTargetSolos();        }    }    public static class BackCheck extends OneWaySync {        public BackCheck(String targetDirName, String srcDirName) {            super(targetDirName, srcDirName);            fakeit = true;            overwrite = false;            if (Debug.debugging("sync")) {                verbose = true;            }            start();            Debug.output("-------- Only In Target Directory--------");            writeUnsynched();            Debug.output("-----------------------------------------");        }        public void handleDirectory(File directory, String[] contentNames) {            String newDirName = getRelativePathFromSource(directory);            if (newDirName == null) {                super.handleDirectory(directory, contentNames);                return;            }            File newDir = getTargetFile(newDirName);            if (!newDir.exists()) {                notCopiedList.add(directory);            }            super.handleDirectory(directory, contentNames);        }        public void handleFile(File file) {            if (!getTargetFile(getRelativePathFromSource(file)).exists()) {                notCopiedList.add(file);            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区果冻传媒| www精品美女久久久tv| 丰满岳乱妇一区二区三区| 国精产品一区一区三区mba桃花| 日韩影视精彩在线| 日本女人一区二区三区| 久久不见久久见免费视频1| 国产毛片精品国产一区二区三区| 狠狠色综合日日| 成人免费的视频| 欧美日韩亚洲综合一区| 久久久五月婷婷| 亚洲欧美一区二区不卡| 午夜视频在线观看一区二区三区| 免费成人在线播放| 成人免费看的视频| 欧美日韩第一区日日骚| 欧美mv日韩mv国产| 国产精品午夜免费| 天堂影院一区二区| 成人一级黄色片| 欧美高清你懂得| 中文字幕日韩一区二区| 另类小说图片综合网| 欧美亚洲国产bt| 国产三级精品三级在线专区| 亚洲1区2区3区视频| 国产成人免费视| 精品免费视频一区二区| 亚洲图片自拍偷拍| 色婷婷亚洲婷婷| 国产丝袜在线精品| 国产一区二区在线看| 欧美一区二区三区日韩视频| 亚洲综合无码一区二区| 蜜桃视频在线观看一区二区| 欧美伊人久久大香线蕉综合69| 国产精品第一页第二页第三页| 激情成人综合网| 日韩欧美亚洲国产另类| 麻豆国产精品官网| 日韩免费高清电影| 国产精品1区2区3区在线观看| 91精品国产综合久久精品麻豆| 夜夜夜精品看看| 在线播放视频一区| 极品少妇xxxx偷拍精品少妇| 欧美大片拔萝卜| 国产精品2024| 中文字幕一区二区三区av| 99视频热这里只有精品免费| 亚洲欧洲精品天堂一级| 欧美中文一区二区三区| 自拍偷拍亚洲综合| 91成人在线观看喷潮| 日本欧美在线观看| 国产三级一区二区| 欧美性一级生活| 老司机精品视频一区二区三区| 精品久久国产字幕高潮| 不卡av在线网| 日韩国产成人精品| 国产日本欧美一区二区| 91福利社在线观看| 国产精品自拍三区| 天天综合天天做天天综合| 国产精品色噜噜| 欧美日韩久久一区二区| 岛国av在线一区| 亚洲午夜电影在线观看| 亚洲三级电影全部在线观看高清| 日本道精品一区二区三区| 蜜桃一区二区三区四区| 一区二区三区**美女毛片| 精品福利一二区| 91精品国产入口在线| av日韩在线网站| 顶级嫩模精品视频在线看| 蜜桃视频在线一区| 日韩电影在线看| 五月激情综合婷婷| 亚洲精品日产精品乱码不卡| 国产精品久久久久久亚洲伦| 久久欧美一区二区| 久久美女艺术照精彩视频福利播放 | 国产网站一区二区三区| 久久综合久色欧美综合狠狠| 欧美日韩一二三| 成人高清av在线| 99久久精品国产一区二区三区 | 欧美日韩国产小视频在线观看| 99精品视频在线观看| 97精品国产97久久久久久久久久久久| 国产毛片精品国产一区二区三区| 黑人巨大精品欧美黑白配亚洲| 国产一区二区三区视频在线播放| 国产在线视视频有精品| 国产成人av电影免费在线观看| 成人av在线资源| 欧美网站大全在线观看| 日韩欧美一区在线观看| 国产区在线观看成人精品| 亚洲男人的天堂在线观看| 亚洲一区二区欧美激情| 久热成人在线视频| 91污片在线观看| 欧美影院午夜播放| 欧美精品一区二区三区四区| 国产精品全国免费观看高清 | 99精品视频在线观看| 欧美日韩精品电影| 国产女同性恋一区二区| 夜夜嗨av一区二区三区中文字幕| 美脚の诱脚舐め脚责91 | 亚洲欧洲性图库| 理论电影国产精品| 欧美精品一二三四| 国产精品三级久久久久三级| 亚洲国产日日夜夜| 国产毛片一区二区| 欧美日韩日日骚| 一区二区三区丝袜| 91麻豆精品在线观看| 国产精品久久久久久福利一牛影视| 天天亚洲美女在线视频| 在线精品视频小说1| 国产精品久久久久久久久搜平片 | 日本韩国一区二区三区| 国产精品欧美一级免费| 国产精品99久久久| 日本一区二区三区四区| 成人动漫在线一区| 国产精品久久久久桃色tv| 狠狠v欧美v日韩v亚洲ⅴ| 日韩欧美在线影院| 久久福利视频一区二区| 欧美一区二区视频网站| 蜜臀av一区二区在线观看| 欧美欧美欧美欧美| 午夜欧美视频在线观看| 一本久道久久综合中文字幕| 亚洲美女区一区| 欧美日韩精品一区视频| 免费看日韩精品| 日韩精品一区二区三区视频播放| 日本aⅴ免费视频一区二区三区 | 亚洲色图一区二区| 欧美日韩美女一区二区| 精品一区二区三区免费视频| 久久久久国产免费免费| 91成人在线免费观看| 久久99国产精品久久99| 亚洲精品少妇30p| 精品国产乱码久久久久久老虎 | 久久精品视频一区二区三区| 99久久精品一区| 美女在线观看视频一区二区| 欧美变态口味重另类| 91亚洲国产成人精品一区二区三 | 99久久婷婷国产综合精品| 亚洲一区二区三区自拍| 7777精品伊人久久久大香线蕉经典版下载| 一区二区在线观看视频| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 中文字幕日韩欧美一区二区三区| 精品视频123区在线观看| 国产一区二区美女| 五月天激情综合网| 日本一区二区高清| 精品欧美一区二区在线观看| 91女厕偷拍女厕偷拍高清| 成人综合婷婷国产精品久久蜜臀| 午夜一区二区三区视频| 一区二区三区日韩在线观看| 久久久99精品免费观看| 国产欧美视频一区二区三区| 欧美巨大另类极品videosbest| jiyouzz国产精品久久| 成人免费视频caoporn| 成人在线综合网| av色综合久久天堂av综合| 99综合影院在线| 色呦呦国产精品| 欧美午夜一区二区三区| 欧美一区二区性放荡片| 欧美变态凌虐bdsm| 国产亚洲精品资源在线26u| 久久久久久99精品| 亚洲欧洲日本在线| 亚洲综合色成人| 久久 天天综合| 成人app软件下载大全免费| 欧美综合久久久| 精品日韩一区二区三区| 成人免费一区二区三区在线观看| 亚洲图片自拍偷拍| 韩国v欧美v日本v亚洲v| 91精品91久久久中77777| 日韩精品一区二区在线观看| 亚洲婷婷国产精品电影人久久|