Java Jar Usage convertAttributes(Attributes attributes)

Here you can find the source of convertAttributes(Attributes attributes)

Description

convert Attributes

License

Open Source License

Declaration

private static Map convertAttributes(Attributes attributes) 

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
 * //from   w  w  w  .  j  a  va2s  .  co  m
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

import java.util.*;
import java.util.jar.*;
import java.util.jar.Attributes.Name;

public class Main {
    private static Map convertAttributes(Attributes attributes) {
        Map result = new HashMap();
        for (Iterator iter = attributes.keySet().iterator(); iter.hasNext();) {
            Attributes.Name key = (Name) iter.next();
            result.put(key.toString(), attributes.getValue(key));
        }
        return result;
    }
}

Related

  1. allocateReadOnlyDictionary(final Attributes attributes)
  2. allocateReadOnlyI18nDictionary(final Attributes attributes, final ResourceBundle resourceBundle)
  3. checkJarValidity(String path)
  4. containsClass(JarFile jarFile, String agentRunnerClassName)
  5. containsClass(JarFile jarFile, String classFilePath)
  6. createPacker()
  7. findClassesByJar(String packageName, JarFile jar, final boolean recursive, Set> classes)
  8. getAttribute(String name, String value)
  9. getClassNameByJar(String jarPath, boolean childPackage)