Here you can find the source of getManifestAttribute(InputStream in, String attr)
public static String getManifestAttribute(InputStream in, String attr)
//package com.java2s; //License from project: LGPL import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.util.jar.Attributes; import java.util.jar.Manifest; public class Main { public static String getManifestAttribute(InputStream in, String attr) { try {//from ww w. jav a 2s. co m Manifest manifest = new Manifest(in); Attributes attributes = manifest.getMainAttributes(); return attributes.getValue(attr); } catch (IOException ex) { throw new UncheckedIOException(ex); } } }