Here you can find the source of loadManifest(byte[] bytes)
Parameter | Description |
---|---|
bytes | The manifest file's content |
Parameter | Description |
---|---|
IOException | an exception |
public static Manifest loadManifest(byte[] bytes) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.jar.Manifest; public class Main { /**//www . j a v a 2 s . c o m * Load a java manifest file. * * @param bytes * The manifest file's content * @return The manifest in object oriented model. * @throws IOException */ public static Manifest loadManifest(byte[] bytes) throws IOException { ByteArrayInputStream fis = new ByteArrayInputStream(bytes); try { Manifest mf = new Manifest(fis); return mf; } finally { fis.close(); } } }