當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。