Java Jar Manifest createManifest(Map customFields)

Here you can find the source of createManifest(Map customFields)

Description

create Manifest

License

Apache License

Declaration

public static Manifest createManifest(Map<String, String> customFields) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Map;

import java.util.jar.Attributes;

import java.util.jar.Manifest;

public class Main {
    public static Manifest createManifest(Map<String, String> customFields) {
        Manifest manifest = new Manifest();
        manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
        for (String key : customFields.keySet()) {
            manifest.getMainAttributes().putValue(key, customFields.get(key));
        }/*from w  w w.  j  av  a  2 s .c  o m*/
        return manifest;
    }
}

Related

  1. checkManifestForR(java.util.jar.JarFile jar)
  2. convertManifest(Manifest manifest)
  3. createManifest()
  4. createManifest(String manifestVerion, String mainClass, String jarInternalClasspath)
  5. createTestManifest(Attributes.Name name, String value)
  6. formatDisplay(String src, Manifest manifest)
  7. generateEmptyManifest()