本文整理汇总了Java中sun.security.util.ManifestEntryVerifier类的典型用法代码示例。如果您正苦于以下问题:Java ManifestEntryVerifier类的具体用法?Java ManifestEntryVerifier怎么用?Java ManifestEntryVerifier使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ManifestEntryVerifier类属于sun.security.util包,在下文中一共展示了ManifestEntryVerifier类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkManifest
import sun.security.util.ManifestEntryVerifier; //导入依赖的package包/类
private JarEntry checkManifest(JarEntry e)
throws IOException
{
if (e != null && JarFile.MANIFEST_NAME.equalsIgnoreCase(e.getName())) {
man = new Manifest();
byte bytes[] = getBytes(new BufferedInputStream(this));
man.read(new ByteArrayInputStream(bytes));
closeEntry();
if (doVerify) {
jv = new JarVerifier(bytes);
mev = new ManifestEntryVerifier(man);
}
return (JarEntry)super.getNextEntry();
}
return e;
}
示例2: update
import sun.security.util.ManifestEntryVerifier; //导入依赖的package包/类
/**
* update an array of bytes.
*/
public void update(int n, byte[] b, int off, int len,
ManifestEntryVerifier mev)
throws IOException
{
if (n != -1) {
if (parsingBlockOrSF) {
baos.write(b, off, n);
} else {
mev.update(b, off, n);
}
} else {
processEntry(mev);
}
}
示例3: JarInputStream
import sun.security.util.ManifestEntryVerifier; //导入依赖的package包/类
/**
* Creates a new <code>JarInputStream</code> and reads the optional
* manifest. If a manifest is present and verify is true, also attempts
* to verify the signatures if the JarInputStream is signed.
*
* @param in the actual input stream
* @param verify whether or not to verify the JarInputStream if
* it is signed.
* @exception IOException if an I/O error has occurred
*/
public JarInputStream(InputStream in, boolean verify) throws IOException {
super(in);
JarEntry e = (JarEntry)super.getNextEntry();
if (e != null && e.getName().equalsIgnoreCase("META-INF/"))
e = (JarEntry)super.getNextEntry();
if (e != null && JarFile.MANIFEST_NAME.equalsIgnoreCase(e.getName())) {
man = new Manifest();
byte bytes[] = getBytes(new BufferedInputStream(this));
man.read(new ByteArrayInputStream(bytes));
//man.read(new BufferedInputStream(this));
closeEntry();
if (verify) {
jv = new JarVerifier(bytes);
mev = new ManifestEntryVerifier(man);
}
first = getNextJarEntry();
} else {
first = e;
}
}
示例4: update
import sun.security.util.ManifestEntryVerifier; //导入依赖的package包/类
/**
* update an array of bytes.
*/
public void update(int n, byte[] b, int off, int len,
ManifestEntryVerifier mev)
throws IOException
{
if (n != -1) {
if (parsingBlockOrSF) {
baos.write(b, off, n);
} else {
mev.update(b, off, n);
}
} else {
processEntry(mev);
}
}
示例5: VerifierStream
import sun.security.util.ManifestEntryVerifier; //导入依赖的package包/类
VerifierStream(Manifest man,
JarEntry je,
InputStream is,
JarVerifier jv) throws IOException
{
this.is = is;
this.jv = jv;
this.mev = new ManifestEntryVerifier(man);
this.jv.beginEntry(je, mev);
this.numLeft = je.getSize();
if (this.numLeft == 0)
this.jv.update(-1, this.mev);
}