Here you can find the source of convertManifest(Manifest manifest)
@SuppressWarnings("rawtypes") public static Properties convertManifest(Manifest manifest)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 Gerd Wuetherich (gerd@gerd-wuetherich.de). * 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 ww. j a v a 2 s . co m*/ * Contributors: * Gerd Wuetherich (gerd@gerd-wuetherich.de) - initial API and implementation ******************************************************************************/ import java.util.Iterator; import java.util.Properties; import java.util.jar.Attributes; import java.util.jar.Manifest; public class Main { @SuppressWarnings("rawtypes") public static Properties convertManifest(Manifest manifest) { Attributes attributes = manifest.getMainAttributes(); Iterator iter = attributes.keySet().iterator(); Properties result = new Properties(); while (iter.hasNext()) { Attributes.Name key = (Attributes.Name) iter.next(); result.put(key.toString(), attributes.get(key)); } return result; } }