Code example for Manifest

Methods: getMainAttributes

0
        mOutputJar.setLevel(9);
        mKey = key;
        mCertificate = certificate;
         
        if (mKey != null && mCertificate != null) {
            mManifest = new Manifest();
            Attributes main = mManifest.getMainAttributes();
            main.putValue("Manifest-Version", "1.0");
            main.putValue("Created-By", "1.0 (Android)");
     
            mBase64Encoder = new BASE64Encoder();
            mMessageDigest = MessageDigest.getInstance(DIGEST_ALGORITHM);
        } 
    } 
     
    /** 
     * Writes a new {@link File} into the archive. 
     * @param inputFile the {@link File} to write. 
     * @param jarPath the filepath inside the archive. 
     * @throws IOException 
     */