Package org.bndtools.utils.jar

Source Code of org.bndtools.utils.jar.JarUtils

package org.bndtools.utils.jar;

import java.io.IOException;
import java.io.InputStream;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;

import aQute.lib.io.IO;

public class JarUtils {

    public static Manifest loadJarManifest(InputStream stream) throws IOException {
        try {
            JarInputStream jarInputStream = new JarInputStream(stream);
            return jarInputStream.getManifest();
        } finally {
            IO.close(stream);
        }
    }
}
TOP

Related Classes of org.bndtools.utils.jar.JarUtils

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.