src/share/classes/java/util/jar/Manifest.java

Print this page
rev 10449 : [mq]: cds

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -23,10 +23,11 @@
  * questions.
  */
 
 package java.util.jar;
 
+import java.io.ByteArrayInputStream;
 import java.io.FilterInputStream;
 import java.io.DataOutputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.IOException;

@@ -78,10 +79,18 @@
         attr.putAll(man.getMainAttributes());
         entries.putAll(man.getEntries());
     }
 
     /**
+     * Used by the VM to create a Manifest object from input bytes.
+     */
+    private static Manifest getManifest(byte buf[]) throws IOException {
+        ByteArrayInputStream is = new ByteArrayInputStream(buf);
+        return new Manifest(is);
+    }
+
+    /**
      * Returns the main Attributes for the Manifest.
      * @return the main Attributes for the Manifest
      */
     public Attributes getMainAttributes() {
         return attr;