get Manifest From File - Java Reflection

Java examples for Reflection:Jar

Description

get Manifest From File

Demo Code


//package com.java2s;

import java.io.File;
import java.io.FileInputStream;

import java.io.IOException;

import java.util.jar.Manifest;

public class Main {
    public static Manifest getManifestFromFile(File manifestFile)
            throws IOException {
        Manifest manifest = new Manifest();
        manifest.read(new FileInputStream(manifestFile));
        return manifest;
    }/*from  ww  w.  jav a2s  . c om*/
}

Related Tutorials