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


Java ManifestEntryVerifier类代码示例

本文整理汇总了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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:JarInputStream.java

示例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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:JarVerifier.java

示例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;
       }
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:33,代码来源:JarInputStream.java

示例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);
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:19,代码来源:JarVerifier.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:JarVerifier.java


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