Java Jar Manifest manifestToProperties(Attributes d)

Here you can find the source of manifestToProperties(Attributes d)

Description

manifest To Properties

License

Open Source License

Declaration

public static Properties manifestToProperties(Attributes d) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:// w ww  .  j  a v a  2s  .c o m
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

import java.util.*;
import java.util.jar.*;

public class Main {
    public static Properties manifestToProperties(Attributes d) {
        Iterator iter = d.keySet().iterator();
        Properties result = new Properties();
        while (iter.hasNext()) {
            Attributes.Name key = (Attributes.Name) iter.next();
            result.put(key.toString(), d.get(key));
        }
        return result;
    }
}

Related

  1. getManifestValue(File jarFile, String key)
  2. getManifestValue(JarFile jarFile, String key, String defaultValue)
  3. getManifestVersionNumber(File file)
  4. getValueFromAttr(Attributes attributes, String manifestValue)
  5. isOSGiManifest(Manifest manifest)
  6. merge(Manifest into, Manifest from)
  7. stripManifest(Manifest manifestIn)