Here you can find the source of convertAttributes(Attributes attributes)
private static Map convertAttributes(Attributes attributes)
//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; } }