Code example for Attributes

Methods: putValue, x 1

0
        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 
     */ 
    public void writeFile(File inputFile, String jarPath) throws IOException {
        // Get an input stream on the file.