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

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

?? filenameutils.java

?? < JavaME核心技術最佳實踐>>的全部源代碼
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
     * The method is entirely text based, and returns the text before and
     * including the last forward or backslash.
     * <pre>
     * C:\a\b\c.txt --> a\b\
     * ~/a/b/c.txt  --> a/b/
     * a.txt        --> ""
     * a/b/c        --> a/b/
     * a/b/c/       --> a/b/c/
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     * <p>
     * This method drops the prefix from the result.
     * See {@link #getFullPath(String)} for the method that retains the prefix.
     *
     * @param filename  the filename to query, null returns null
     * @return the path of the file, an empty string if none exists, null if invalid
     */
    public static String getPath(String filename) {
        return doGetPath(filename, 1);
    }

    /**
     * Gets the path from a full filename, which excludes the prefix, and
     * also excluding the final directory separator.
     * <p>
     * This method will handle a file in either Unix or Windows format.
     * The method is entirely text based, and returns the text before the
     * last forward or backslash.
     * <pre>
     * C:\a\b\c.txt --> a\b
     * ~/a/b/c.txt  --> a/b
     * a.txt        --> ""
     * a/b/c        --> a/b
     * a/b/c/       --> a/b/c
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     * <p>
     * This method drops the prefix from the result.
     * See {@link #getFullPathNoEndSeparator(String)} for the method that retains the prefix.
     *
     * @param filename  the filename to query, null returns null
     * @return the path of the file, an empty string if none exists, null if invalid
     */
    public static String getPathNoEndSeparator(String filename) {
        return doGetPath(filename, 0);
    }

    /**
     * Does the work of getting the path.
     * 
     * @param filename  the filename
     * @param separatorAdd  0 to omit the end separator, 1 to return it
     * @return the path
     */
    private static String doGetPath(String filename, int separatorAdd) {
        if (filename == null) {
            return null;
        }
        int prefix = getPrefixLength(filename);
        if (prefix < 0) {
            return null;
        }
        int index = indexOfLastSeparator(filename);
        if (prefix >= filename.length() || index < 0) {
            return "";
        }
        return filename.substring(prefix, index + separatorAdd);
    }

    /**
     * Gets the full path from a full filename, which is the prefix + path.
     * <p>
     * This method will handle a file in either Unix or Windows format.
     * The method is entirely text based, and returns the text before and
     * including the last forward or backslash.
     * <pre>
     * C:\a\b\c.txt --> C:\a\b\
     * ~/a/b/c.txt  --> ~/a/b/
     * a.txt        --> ""
     * a/b/c        --> a/b/
     * a/b/c/       --> a/b/c/
     * C:           --> C:
     * C:\          --> C:\
     * ~            --> ~/
     * ~/           --> ~/
     * ~user        --> ~user/
     * ~user/       --> ~user/
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     *
     * @param filename  the filename to query, null returns null
     * @return the path of the file, an empty string if none exists, null if invalid
     */
    public static String getFullPath(String filename) {
        return doGetFullPath(filename, true);
    }

    /**
     * Gets the full path from a full filename, which is the prefix + path,
     * and also excluding the final directory separator.
     * <p>
     * This method will handle a file in either Unix or Windows format.
     * The method is entirely text based, and returns the text before the
     * last forward or backslash.
     * <pre>
     * C:\a\b\c.txt --> C:\a\b
     * ~/a/b/c.txt  --> ~/a/b
     * a.txt        --> ""
     * a/b/c        --> a/b
     * a/b/c/       --> a/b/c
     * C:           --> C:
     * C:\          --> C:\
     * ~            --> ~
     * ~/           --> ~
     * ~user        --> ~user
     * ~user/       --> ~user
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     *
     * @param filename  the filename to query, null returns null
     * @return the path of the file, an empty string if none exists, null if invalid
     */
    public static String getFullPathNoEndSeparator(String filename) {
        return doGetFullPath(filename, false);
    }

    /**
     * Does the work of getting the path.
     * 
     * @param filename  the filename
     * @param includeSeparator  true to include the end separator
     * @return the path
     */
    private static String doGetFullPath(String filename, boolean includeSeparator) {
        if (filename == null) {
            return null;
        }
        int prefix = getPrefixLength(filename);
        if (prefix < 0) {
            return null;
        }
        if (prefix >= filename.length()) {
            if (includeSeparator) {
                return getPrefix(filename);  // add end slash if necessary
            } else {
                return filename;
            }
        }
        int index = indexOfLastSeparator(filename);
        if (index < 0) {
            return filename.substring(0, prefix);
        }
        int end = index + (includeSeparator ?  1 : 0);
        return filename.substring(0, end);
    }

    /**
     * Gets the name minus the path from a full filename.
     * <p>
     * This method will handle a file in either Unix or Windows format.
     * The text after the last forward or backslash is returned.
     * <pre>
     * a/b/c.txt --> c.txt
     * a.txt     --> a.txt
     * a/b/c     --> c
     * a/b/c/    --> ""
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     *
     * @param filename  the filename to query, null returns null
     * @return the name of the file without the path, or an empty string if none exists
     */
    public static String getName(String filename) {
        if (filename == null) {
            return null;
        }
        int index = indexOfLastSeparator(filename);
        return filename.substring(index + 1);
    }

    /**
     * Gets the base name, minus the full path and extension, from a full filename.
     * <p>
     * This method will handle a file in either Unix or Windows format.
     * The text after the last forward or backslash and before the last dot is returned.
     * <pre>
     * a/b/c.txt --> c
     * a.txt     --> a
     * a/b/c     --> c
     * a/b/c/    --> ""
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     *
     * @param filename  the filename to query, null returns null
     * @return the name of the file without the path, or an empty string if none exists
     */
    public static String getBaseName(String filename) {
        return removeExtension(getName(filename));
    }

    /**
     * Gets the extension of a filename.
     * <p>
     * This method returns the textual part of the filename after the last dot.
     * There must be no directory separator after the dot.
     * <pre>
     * foo.txt      --> "txt"
     * a/b/c.jpg    --> "jpg"
     * a/b.txt/c    --> ""
     * a/b/c        --> ""
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     *
     * @param filename the filename to retrieve the extension of.
     * @return the extension of the file or an empty string if none exists.
     */
    public static String getExtension(String filename) {
        if (filename == null) {
            return null;
        }
        int index = indexOfExtension(filename);
        if (index == -1) {
            return "";
        } else {
            return filename.substring(index + 1);
        }
    }

    //-----------------------------------------------------------------------
    /**
     * Removes the extension from a filename.
     * <p>
     * This method returns the textual part of the filename before the last dot.
     * There must be no directory separator after the dot.
     * <pre>
     * foo.txt    --> foo
     * a\b\c.jpg  --> a\b\c
     * a\b\c      --> a\b\c
     * a.b\c      --> a.b\c
     * </pre>
     * <p>
     * The output will be the same irrespective of the machine that the code is running on.
     *
     * @param filename  the filename to query, null returns null
     * @return the filename minus the extension
     */
    public static String removeExtension(String filename) {
        if (filename == null) {
            return null;
        }
        int index = indexOfExtension(filename);
        if (index == -1) {
            return filename;
        } else {
            return filename.substring(0, index);
        }
    }

    //-----------------------------------------------------------------------
    /**
     * Checks whether two filenames are equal exactly.
     * <p>
     * No processing is performed on the filenames other than comparison,
     * thus this is merely a null-safe case-sensitive equals.
     *
     * @param filename1  the first filename to query, may be null
     * @param filename2  the second filename to query, may be null
     * @return true if the filenames are equal, null equals null
     */
    public static boolean equals(String filename1, String filename2) {
        return equals(filename1, filename2, false, false);
    }

    /**
     * Checks whether two filenames are equal using the case rules of the system.
     * <p>
     * No processing is performed on the filenames other than comparison.
     * The check is case-sensitive on Unix and case-insensitive on Windows.
     *
     * @param filename1  the first filename to query, may be null
     * @param filename2  the second filename to query, may be null
     * @return true if the filenames are equal, null equals null
     */
    public static boolean equalsOnSystem(String filename1, String filename2) {
        return equals(filename1, filename2, true, false);
    }

    //-----------------------------------------------------------------------
    /**
     * Checks whether two filenames are equal after both have been normalized.
     * <p>
     * Both filenames are first passed to {@link #normalize(String)}.
     * The check is then performed in a case-sensitive manner.
     *
     * @param filename1  the first filename to query, may be null
     * @param filename2  the second filename to query, may be null
     * @return true if the filenames are equal, null equals null
     */
    public static boolean equalsNormalized(String filename1, String filename2) {
        return equals(filename1, filename2, false, true);
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品日韩一区| 综合色中文字幕| 欧美日韩中文字幕精品| 成人精品视频网站| 美日韩一级片在线观看| 午夜成人免费视频| 综合分类小说区另类春色亚洲小说欧美| 日韩精品一区二区在线| 91精品婷婷国产综合久久性色| 91福利在线看| 粉嫩aⅴ一区二区三区四区五区| 九九精品视频在线看| 日韩成人午夜电影| 日韩国产欧美在线播放| 伊人性伊人情综合网| 亚洲三级小视频| 国产精品成人在线观看| 国产精品午夜久久| 日韩精品中文字幕一区| 日韩欧美国产午夜精品| 日韩精品在线一区| 日韩女优视频免费观看| 在线综合视频播放| 在线这里只有精品| 欧美三级在线播放| 欧美精品久久久久久久多人混战 | 色婷婷久久一区二区三区麻豆| 国产精品一二三区| 久久久久久久久久久久久夜| 欧美日韩卡一卡二| 欧美亚洲国产一区在线观看网站| 欧美性猛交xxxx乱大交退制版 | 91九色最新地址| 欧美亚洲国产bt| 欧美一级免费大片| 精品视频1区2区| 精品视频色一区| 在线观看视频一区| 欧美色图第一页| 日韩免费观看高清完整版在线观看| 欧美电影免费观看完整版| 久久亚洲精精品中文字幕早川悠里| 精品免费国产二区三区| 欧美—级在线免费片| 亚洲日本一区二区| 午夜伊人狠狠久久| 国产91清纯白嫩初高中在线观看| 色婷婷av一区二区| 日韩免费看网站| 中文字幕在线不卡一区| 一区二区三区在线视频观看| 亚洲国产视频在线| 久久精品国产精品青草| 高清国产午夜精品久久久久久| av中文字幕不卡| 99热在这里有精品免费| 欧美在线观看18| 欧美人狂配大交3d怪物一区| 欧美日韩一区二区在线观看| 久久综合九色综合97婷婷女人| 国产女同性恋一区二区| 一级中文字幕一区二区| 美腿丝袜亚洲一区| av一本久道久久综合久久鬼色| 在线视频欧美精品| 久久免费午夜影院| 亚洲午夜久久久| 国产真实乱偷精品视频免| 在线观看国产一区二区| 日韩一区二区三区在线| 国产精品免费网站在线观看| 午夜免费久久看| 成人黄色777网| 日韩三级视频在线观看| 国产视频一区二区在线| 亚洲成av人影院在线观看网| 国产一区二区视频在线| 91蝌蚪porny成人天涯| 欧美日韩中文精品| 国产精品视频看| 免费观看一级欧美片| 国产呦精品一区二区三区网站| 99精品视频一区二区| 久久理论电影网| 视频在线观看一区| 波多野结衣亚洲| 久久亚洲一级片| 午夜精品aaa| 色94色欧美sute亚洲线路一久| 91.com视频| 亚洲三级电影网站| 高清国产一区二区三区| 精品伦理精品一区| 午夜精品在线看| 色综合色综合色综合色综合色综合 | 国产精品综合网| 欧美中文字幕一区| 国产精品私人自拍| 黄色日韩三级电影| 欧美性极品少妇| 最新成人av在线| 韩日av一区二区| 欧美精品在线观看播放| 久久精品欧美日韩| 日韩国产在线一| youjizz久久| 国产日韩欧美高清| 蜜臀av性久久久久av蜜臀妖精 | 日韩免费一区二区| 亚洲精品自拍动漫在线| 成人高清视频免费观看| 日韩精品中午字幕| 一区二区三区在线观看网站| 成人白浆超碰人人人人| 久久九九全国免费| 狠狠狠色丁香婷婷综合激情| 日韩一级二级三级| 日韩不卡一二三区| caoporm超碰国产精品| 欧美国产日韩亚洲一区| 春色校园综合激情亚洲| 国产精品天美传媒| 国产成人a级片| 日韩欧美在线网站| 久国产精品韩国三级视频| 精品视频一区二区三区免费| 性做久久久久久免费观看| 欧美绝品在线观看成人午夜影视| 亚洲精品乱码久久久久久日本蜜臀| 91香蕉视频mp4| 国产精品沙发午睡系列990531| 九色综合狠狠综合久久| 久久婷婷久久一区二区三区| 国产一区二区免费看| 国产亚洲欧美一区在线观看| 国产不卡高清在线观看视频| 欧美极品美女视频| 色吊一区二区三区| 午夜精品久久久久久久久久| 7777女厕盗摄久久久| 狠狠狠色丁香婷婷综合激情 | 久久精品一区二区三区av| 岛国精品在线观看| 亚洲六月丁香色婷婷综合久久 | 日本va欧美va精品发布| xf在线a精品一区二区视频网站| 成人一二三区视频| 亚洲成人激情综合网| 久久综合久色欧美综合狠狠| 91玉足脚交白嫩脚丫在线播放| 亚洲大片在线观看| 国产午夜精品久久久久久免费视| 色综合久久久久久久| 麻豆精品视频在线观看免费| 亚洲欧美在线aaa| 欧美电影免费观看完整版| 色婷婷激情一区二区三区| 国内精品写真在线观看| 一区二区三区免费网站| 久久久午夜精品| 欧美视频一区二区三区四区 | 91黄色激情网站| 国产美女视频91| 日本不卡一区二区三区| 亚洲人妖av一区二区| 欧美精品一区二区三区蜜桃| 91久久香蕉国产日韩欧美9色| 精品一区二区三区免费| 午夜视频在线观看一区二区| 中文字幕亚洲电影| 精品国产一区a| 欧美日韩激情一区二区| 91小宝寻花一区二区三区| 国产精品一区一区| 日韩国产高清在线| 亚洲最大成人网4388xx| 国产精品午夜在线| 久久久久久97三级| 日韩欧美亚洲另类制服综合在线| 在线免费av一区| 成人的网站免费观看| 国产风韵犹存在线视精品| 精品一区二区三区香蕉蜜桃 | 日韩 欧美一区二区三区| 亚洲免费毛片网站| 国产日韩欧美在线一区| 亚洲精品一区二区三区影院| 欧美浪妇xxxx高跟鞋交| 在线观看精品一区| 日本精品视频一区二区| 成人免费高清视频| 成人免费视频app| 国产精品99久久久久久有的能看| 亚洲国产va精品久久久不卡综合| 亚洲男同性恋视频| 亚洲色图视频免费播放| 亚洲欧洲在线观看av| 综合中文字幕亚洲| 日韩理论片中文av| 亚洲老妇xxxxxx|