Package java.util.jar

Examples of java.util.jar.Attributes.keySet()


public class ManifestResourceBuilder extends DictionaryResourceBuilder {

    public ManifestResourceBuilder load(Manifest manifest) {
        Hashtable<String, String> headers = new Hashtable<String, String>();
        Attributes mainatts = manifest.getMainAttributes();
        for (Object key : mainatts.keySet()) {
            String name = key.toString();
            String value = mainatts.getValue(name);
            headers.put(name, value);
        }
        load(headers);
View Full Code Here


        // Remove all the headers mentioned in -removeheaders
        Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVE_HEADERS));
        for (Iterator<String> i = removes.keySet().iterator(); i.hasNext();) {
            String header = i.next();
            for (Iterator<Object> j = main.keySet().iterator(); j.hasNext();) {
                Attributes.Name attr = (Attributes.Name) j.next();
                if (attr.toString().matches(header)) {
                    j.remove();
                    progress("Removing header: " + header);
                }
View Full Code Here

     * @throws IOException
     */
    public void mergeManifest(Manifest manifest) throws IOException {
        if (manifest != null) {
            Attributes attributes = manifest.getMainAttributes();
            for (Iterator<Object> i = attributes.keySet().iterator(); i
                    .hasNext();) {
                Name name = (Name) i.next();
                String key = name.toString();
                // Dont want instructions
                if (key.startsWith("-"))
View Full Code Here

        }

        private void appendOriginalManifest(Manifest manifest, Attributes main) {
            if (originalManifest != null) {
                Attributes attributes = originalManifest.getMainAttributes();
                for (Object key : attributes.keySet()) {
                    if (!main.containsKey(key) || key.equals(Bundle_Activator)) {
                        main.put(key, attributes.get(key));
                    }
                }
View Full Code Here

    public ManifestResourceBuilder load(Manifest manifest) {
        NotNullException.assertValue(manifest, "manifest");
        Hashtable<String, String> headers = new Hashtable<String, String>();
        Attributes mainatts = manifest.getMainAttributes();
        for (Object key : mainatts.keySet()) {
            String name = key.toString();
            String value = mainatts.getValue(name);
            headers.put(name, value);
        }
        load(headers);
View Full Code Here

    // Remove all the headers mentioned in -removeheaders
    Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVEHEADERS));
    Set<Instruction> matchers = Instruction.replaceWithInstruction(removes).keySet();

    Collection<Object> toBeRemoved = Instruction.select(matchers, main.keySet());
    Iterator<Object> i = main.keySet().iterator();
    while (i.hasNext())
      if (toBeRemoved.contains(i.next()))
        i.remove();
View Full Code Here

    // Remove all the headers mentioned in -removeheaders
    Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVEHEADERS));
    Set<Instruction> matchers = Instruction.replaceWithInstruction(removes).keySet();

    Collection<Object> toBeRemoved = Instruction.select(matchers, main.keySet());
    Iterator<Object> i = main.keySet().iterator();
    while (i.hasNext())
      if (toBeRemoved.contains(i.next()))
        i.remove();

    dot.setManifest(manifest);
View Full Code Here

   * @throws IOException
   */
  public void mergeManifest(Manifest manifest) throws IOException {
    if (manifest != null) {
      Attributes attributes = manifest.getMainAttributes();
      for (Iterator<Object> i = attributes.keySet().iterator(); i.hasNext();) {
        Name name = (Name) i.next();
        String key = name.toString();
        // Dont want instructions
        if (key.startsWith("-"))
          continue;
View Full Code Here

        // Remove all the headers mentioned in -removeheaders
        Map<String, Map<String, String>> removes = parseHeader(getProperty(REMOVE_HEADERS));
        for (Iterator<String> i = removes.keySet().iterator(); i.hasNext();) {
            String header = i.next();
            for (Iterator<Object> j = main.keySet().iterator(); j.hasNext();) {
                Attributes.Name attr = (Attributes.Name) j.next();
                if (attr.toString().matches(header)) {
                    j.remove();
                    progress("Removing header: " + header);
                }
View Full Code Here

     * @throws IOException
     */
    public void mergeManifest(Manifest manifest) throws IOException {
        if (manifest != null) {
            Attributes attributes = manifest.getMainAttributes();
            for (Iterator<Object> i = attributes.keySet().iterator(); i
                    .hasNext();) {
                Name name = (Name) i.next();
                String key = name.toString();
                // Dont want instructions
                if (key.startsWith("-"))
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.