当前位置: 首页>>代码示例>>Java>>正文


Java Util.asciiEqualsIgnoreCase方法代码示例

本文整理汇总了Java中org.apache.harmony.archive.util.Util.asciiEqualsIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:Java Util.asciiEqualsIgnoreCase方法的具体用法?Java Util.asciiEqualsIgnoreCase怎么用?Java Util.asciiEqualsIgnoreCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.harmony.archive.util.Util的用法示例。


在下文中一共展示了Util.asciiEqualsIgnoreCase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: equals

import org.apache.harmony.archive.util.Util; //导入方法依赖的package包/类
/**
 * Returns whether the argument provided is the same as the attribute
 * name.
 *
 * @return if the attribute names correspond.
 * @param object
 *            An attribute name to be compared with this name.
 */
@Override
public boolean equals(Object object) {
    if (object == null || object.getClass() != getClass()
            || object.hashCode() != hashCode()) {
        return false;
    }

    return Util.asciiEqualsIgnoreCase(name, ((Name) object).name);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:18,代码来源:Attributes.java

示例2: readMetaEntries

import org.apache.harmony.archive.util.Util; //导入方法依赖的package包/类
/**
 * Called by the JarFile constructors, this method reads the contents of the
 * file's META-INF/ directory and picks out the MANIFEST.MF file and
 * verifier signature files if they exist. Any signature files found are
 * registered with the verifier.
 *
 * @throws IOException
 *             if there is a problem reading the jar file entries.
 */
private void readMetaEntries() throws IOException {
    // Get all meta directory entries
    ZipEntry[] metaEntries = getMetaEntriesImpl();
    if (metaEntries == null) {
        verifier = null;
        return;
    }

    boolean signed = false;

    for (ZipEntry entry : metaEntries) {
        String entryName = entry.getName();
        // Is this the entry for META-INF/MANIFEST.MF ?
        if (manifestEntry == null
                && Util.asciiEqualsIgnoreCase(MANIFEST_NAME, entryName)) {
            manifestEntry = entry;
            // If there is no verifier then we don't need to look any further.
            if (verifier == null) {
                break;
            }
        } else {
            // Is this an entry that the verifier needs?
            if (verifier != null
                    && (Util.asciiEndsWithIgnoreCase(entryName, ".SF")
                            || Util.asciiEndsWithIgnoreCase(entryName, ".DSA")
                            || Util.asciiEndsWithIgnoreCase(entryName, ".RSA"))) {
                signed = true;
                InputStream is = super.getInputStream(entry);
                byte[] buf = InputStreamHelper.readFullyAndClose(is);
                verifier.addMetaEntry(entryName, buf);
            }
        }
    }

    // If there were no signature files, then no verifier work to do.
    if (!signed) {
        verifier = null;
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:49,代码来源:JarFile.java

示例3: readMetaEntries

import org.apache.harmony.archive.util.Util; //导入方法依赖的package包/类
/**
 * Called by the JarFile constructors, this method reads the contents of the
 * file's META-INF/ directory and picks out the MANIFEST.MF file and
 * verifier signature files if they exist. Any signature files found are
 * registered with the verifier.
 * 
 * @throws IOException
 *             if there is a problem reading the jar file entries.
 */
private void readMetaEntries() throws IOException {
    // Get all meta directory entries
    ZipEntry[] metaEntries = getMetaEntriesImpl();
    if (metaEntries == null) {
        verifier = null;
        return;
    }

    boolean signed = false;

    for (ZipEntry entry : metaEntries) {
        String entryName = entry.getName();
        // Is this the entry for META-INF/MANIFEST.MF ?
        if (manifestEntry == null
                && Util.asciiEqualsIgnoreCase(MANIFEST_NAME, entryName)) {
            manifestEntry = entry;
            // If there is no verifier then we don't need to look any further.
            if (verifier == null) {
                break;
            }
        } else {
            // Is this an entry that the verifier needs?
            if (verifier != null
                    && (Util.asciiEndsWithIgnoreCase(entryName, ".SF")
                            || Util.asciiEndsWithIgnoreCase(entryName, ".DSA")
                            || Util.asciiEndsWithIgnoreCase(entryName, ".RSA"))) {
                signed = true;
                InputStream is = super.getInputStream(entry);
                byte[] buf = InputStreamHelper.readFullyAndClose(is);
                verifier.addMetaEntry(entryName, buf);
            }
        }
    }

    // If there were no signature files, then no verifier work to do.
    if (!signed) {
        verifier = null;
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:49,代码来源:JarFile.java


注:本文中的org.apache.harmony.archive.util.Util.asciiEqualsIgnoreCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。