當前位置: 首頁>>代碼示例>>Java>>正文


Java IOCase.SENSITIVE屬性代碼示例

本文整理匯總了Java中org.apache.commons.io.IOCase.SENSITIVE屬性的典型用法代碼示例。如果您正苦於以下問題:Java IOCase.SENSITIVE屬性的具體用法?Java IOCase.SENSITIVE怎麽用?Java IOCase.SENSITIVE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.apache.commons.io.IOCase的用法示例。


在下文中一共展示了IOCase.SENSITIVE屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: equals

/**
 * Checks whether two filenames are equal, optionally normalizing and providing
 * control over the case-sensitivity.
 *
 * @param filename1  the first filename to query, may be null
 * @param filename2  the second filename to query, may be null
 * @param normalized  whether to normalize the filenames
 * @param caseSensitivity  what case sensitivity rule to use, null means case-sensitive
 * @return true if the filenames are equal, null equals null
 * @since 1.3
 */
public static boolean equals(
        String filename1, String filename2,
        boolean normalized, IOCase caseSensitivity) {
    
    if (filename1 == null || filename2 == null) {
        return filename1 == null && filename2 == null;
    }
    if (normalized) {
        filename1 = normalize(filename1);
        filename2 = normalize(filename2);
        if (filename1 == null || filename2 == null) {
            throw new NullPointerException(
                "Error normalizing one or both of the file names");
        }
    }
    if (caseSensitivity == null) {
        caseSensitivity = IOCase.SENSITIVE;
    }
    return caseSensitivity.checkEquals(filename1, filename2);
}
 
開發者ID:mavek87,項目名稱:Java-MyCopies,代碼行數:31,代碼來源:FilenameUtils.java

示例2: searchPrefixFile

/**
 * 查找需要合並文件的臨時文件信息
 *
 * @param directory       臨時文件所在的目錄
 * @param prefix          臨時文件的前綴
 * @param caseSensitivity 臨時文件的大小寫敏感
 * @return collection
 */
public static Collection<File> searchPrefixFile(File directory, String prefix, boolean
        caseSensitivity) {
    IOCase iocase = IOCase.INSENSITIVE;
    if (caseSensitivity) {
        iocase = IOCase.SENSITIVE;
    }
    //創建相關的過濾器
    IOFileFilter fileFilter = FileFilterUtils.prefixFileFilter(prefix, iocase);
    //檢查相關的過濾信息
    return FileUtils.listFiles(directory, fileFilter, FalseFileFilter.INSTANCE);
}
 
開發者ID:numsg,項目名稱:spring-boot-seed,代碼行數:19,代碼來源:FileOperateUtils.java

示例3: WildcardFileFilter

/**
 * Construct a new wildcard filter for a single wildcard specifying case-sensitivity.
 *
 * @param wildcard  the wildcard to match, not null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the pattern is null
 */
public WildcardFileFilter(String wildcard, IOCase caseSensitivity) {
    if (wildcard == null) {
        throw new IllegalArgumentException("The wildcard must not be null");
    }
    this.wildcards = new String[] { wildcard };
    this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:14,代碼來源:WildcardFileFilter.java

示例4: NameFileFilter

/**
 * Constructs a new name file filter for an array of names specifying case-sensitivity.
 *
 * @param names  the names to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the names array is null
 */
public NameFileFilter(final String[] names, final IOCase caseSensitivity) {
    if (names == null) {
        throw new IllegalArgumentException("The array of names must not be null");
    }
    this.names = new String[names.length];
    System.arraycopy(names, 0, this.names, 0, names.length);
    this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
}
 
開發者ID:RoccoDev,項目名稱:JAATP,代碼行數:15,代碼來源:NameFileFilter.java

示例5: WildcardFileFilter

/**
 * Construct a new wildcard filter for an array of wildcards specifying case-sensitivity.
 * <p>
 *
 * @param wildcards  the array of wildcards to match, not null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the pattern array is null
 */
public WildcardFileFilter(final String[] wildcards, final IOCase caseSensitivity) {
    if (wildcards == null) {
        throw new IllegalArgumentException("The wildcard array must not be null");
    }
    this.wildcards = new String[wildcards.length];
    System.arraycopy(wildcards, 0, this.wildcards, 0, wildcards.length);
    this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
}
 
開發者ID:PuppyRush,項目名稱:WidgetStore,代碼行數:16,代碼來源:WildcardFileFilter.java

示例6: NameFileFilter

/**
 * Construct a new name file filter specifying case-sensitivity.
 *
 * @param name  the name to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the name is null
 */
public NameFileFilter(String name, IOCase caseSensitivity) {
    if (name == null) {
        throw new IllegalArgumentException("The wildcard must not be null");
    }
    this.names = new String[] {name};
    this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
}
 
開發者ID:Sukelluskello,項目名稱:VectorAttackScanner,代碼行數:14,代碼來源:NameFileFilter.java

示例7: WildcardFileFilter

/**
 * Construct a new wildcard filter for a single wildcard specifying case-sensitivity.
 *
 * @param wildcard  the wildcard to match, not null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the pattern is null
 */
public WildcardFileFilter(String wildcard, IOCase caseSensitivity) {
    if (wildcard == null) {
        throw new IllegalArgumentException("The wildcard must not be null");
    }
    this.wildcards = new String[] { wildcard };
    this.caseSensitivity = (caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity);
}
 
開發者ID:miuirussia,項目名稱:KJBE,代碼行數:14,代碼來源:WildcardFileFilter.java

示例8: NameFileComparator

/**
 * Construct a case sensitive file name comparator instance.
 */
public NameFileComparator() {
    this.caseSensitivity = IOCase.SENSITIVE;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:6,代碼來源:NameFileComparator.java

示例9: PathFileComparator

/**
 * Construct a case sensitive file path comparator instance.
 */
public PathFileComparator() {
    this.caseSensitivity = IOCase.SENSITIVE;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:6,代碼來源:PathFileComparator.java

示例10: ExtensionFileComparator

/**
 * Construct a case sensitive file extension comparator instance.
 */
public ExtensionFileComparator() {
    this.caseSensitivity = IOCase.SENSITIVE;
}
 
開發者ID:RoccoDev,項目名稱:JAATP,代碼行數:6,代碼來源:ExtensionFileComparator.java

示例11: PrefixFileFilter

/**
 * Constructs a new Prefix file filter for a single prefix 
 * specifying case-sensitivity.
 * 
 * @param prefix  the prefix to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the prefix is null
 * @since 1.4
 */
public PrefixFileFilter(String prefix, IOCase caseSensitivity) {
    if (prefix == null) {
        throw new IllegalArgumentException("The prefix must not be null");
    }
    this.prefixes = new String[] {prefix};
    this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:16,代碼來源:PrefixFileFilter.java

示例12: PrefixFileFilter

/**
 * Constructs a new Prefix file filter for a single prefix 
 * specifying case-sensitivity.
 * 
 * @param prefix  the prefix to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the prefix is null
 * @since Commons IO 1.4
 */
public PrefixFileFilter(String prefix, IOCase caseSensitivity) {
    if (prefix == null) {
        throw new IllegalArgumentException("The prefix must not be null");
    }
    this.prefixes = new String[] {prefix};
    this.caseSensitivity = (caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity);
}
 
開發者ID:fesch,項目名稱:Moenagade,代碼行數:16,代碼來源:PrefixFileFilter.java

示例13: SuffixFileFilter

/**
 * Constructs a new Suffix file filter for a list of suffixes
 * specifying case-sensitivity.
 * 
 * @param suffixes  the suffixes to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the suffix list is null
 * @throws ClassCastException if the list does not contain Strings
 * @since 1.4
 */
public SuffixFileFilter(List<String> suffixes, IOCase caseSensitivity) {
    if (suffixes == null) {
        throw new IllegalArgumentException("The list of suffixes must not be null");
    }
    this.suffixes = suffixes.toArray(new String[suffixes.size()]);
    this.caseSensitivity = caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:17,代碼來源:SuffixFileFilter.java

示例14: NameFileFilter

/**
 * Constructs a new name file filter for a list of names specifying case-sensitivity.
 * 
 * @param names  the names to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the name list is null
 * @throws ClassCastException if the list does not contain Strings
 */
public NameFileFilter(List<String> names, IOCase caseSensitivity) {
    if (names == null) {
        throw new IllegalArgumentException("The list of names must not be null");
    }
    this.names = names.toArray(new String[names.size()]);
    this.caseSensitivity = (caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity);
}
 
開發者ID:fesch,項目名稱:Moenagade,代碼行數:15,代碼來源:NameFileFilter.java

示例15: SuffixFileFilter

/**
 * Constructs a new Suffix file filter for a list of suffixes
 * specifying case-sensitivity.
 * 
 * @param suffixes  the suffixes to allow, must not be null
 * @param caseSensitivity  how to handle case sensitivity, null means case-sensitive
 * @throws IllegalArgumentException if the suffix list is null
 * @throws ClassCastException if the list does not contain Strings
 * @since Commons IO 1.4
 */
public SuffixFileFilter(List<String> suffixes, IOCase caseSensitivity) {
    if (suffixes == null) {
        throw new IllegalArgumentException("The list of suffixes must not be null");
    }
    this.suffixes = suffixes.toArray(new String[suffixes.size()]);
    this.caseSensitivity = (caseSensitivity == null ? IOCase.SENSITIVE : caseSensitivity);
}
 
開發者ID:fesch,項目名稱:Moenagade,代碼行數:17,代碼來源:SuffixFileFilter.java


注:本文中的org.apache.commons.io.IOCase.SENSITIVE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。