当前位置: 首页>>代码示例>>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;未经允许,请勿转载。