Here you can find the source of getManifest(File in)
Parameter | Description |
---|---|
in | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
private static Manifest getManifest(File in) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.util.jar.JarFile; import java.util.jar.Manifest; public class Main { /**//from w w w . j a v a 2 s . c o m * Assumes the given file is a jar and retrieves the manifest. * * @param in * @return * @throws IOException */ private static Manifest getManifest(File in) throws IOException { JarFile jar = new JarFile(in); Manifest manifest = jar.getManifest(); jar.close(); return manifest; } }