本文整理汇总了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);
}
示例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;
}
}
示例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;
}
}