1 *java.util.jar.Manifest* *Manifest* The Manifest class is used to maintain Manif
4 extends |java.lang.Object|
5 implements |java.lang.Cloneable|
7 |java.util.jar.Manifest_Description|
8 |java.util.jar.Manifest_Fields|
9 |java.util.jar.Manifest_Constructors|
10 |java.util.jar.Manifest_Methods|
12 ================================================================================
14 *java.util.jar.Manifest_Constructors*
15 |java.util.jar.Manifest()|Constructs a new, empty Manifest.
16 |java.util.jar.Manifest(InputStream)|Constructs a new Manifest from the specifi
17 |java.util.jar.Manifest(Manifest)|Constructs a new Manifest that is a copy of t
19 *java.util.jar.Manifest_Methods*
20 |java.util.jar.Manifest.clear()|Clears the main Attributes as well as the entri
21 |java.util.jar.Manifest.clone()|Returns a shallow copy of this Manifest.
22 |java.util.jar.Manifest.equals(Object)|Returns true if the specified Object is
23 |java.util.jar.Manifest.getAttributes(String)|Returns the Attributes for the sp
24 |java.util.jar.Manifest.getEntries()|Returns a Map of the entries contained in
25 |java.util.jar.Manifest.getMainAttributes()|Returns the main Attributes for the
26 |java.util.jar.Manifest.hashCode()|Returns the hash code for this Manifest.
27 |java.util.jar.Manifest.read(InputStream)|Reads the Manifest from the specified
28 |java.util.jar.Manifest.write(OutputStream)|Writes the Manifest to the specifie
30 *java.util.jar.Manifest_Description*
32 The Manifest class is used to maintain Manifest entry names and their
33 associated Attributes. There are main Manifest Attributes as well as per-entry
34 Attributes. For information on the Manifest format, please see the
36 Manifest format specification.
40 *java.util.jar.Manifest()*
44 Constructs a new, empty Manifest.
47 *java.util.jar.Manifest(InputStream)*
49 public Manifest(java.io.InputStream is)
50 throws |java.io.IOException|
52 Constructs a new Manifest from the specified input stream.
54 is - the input stream containing manifest data
56 *java.util.jar.Manifest(Manifest)*
58 public Manifest(java.util.jar.Manifest man)
60 Constructs a new Manifest that is a copy of the specified Manifest.
62 man - the Manifest to copy
64 *java.util.jar.Manifest.clear()*
68 Clears the main Attributes as well as the entries in this Manifest.
72 *java.util.jar.Manifest.clone()*
74 public |java.lang.Object| clone()
76 Returns a shallow copy of this Manifest. The shallow copy is implemented as
79 public Object clone() { return new Manifest(this); }
83 Returns: a shallow copy of this Manifest
85 *java.util.jar.Manifest.equals(Object)*
87 public boolean equals(java.lang.Object o)
89 Returns true if the specified Object is also a Manifest and has the same main
90 Attributes and entries.
93 o - the object to be compared
95 Returns: true if the specified Object is also a Manifest and has the same main
96 Attributes and entries
98 *java.util.jar.Manifest.getAttributes(String)*
100 public |java.util.jar.Attributes| getAttributes(java.lang.String name)
102 Returns the Attributes for the specified entry name. This method is defined as:
104 return (Attributes)getEntries().get(name)
106 Thoughnullis a validname, whengetAttributes(null)is invoked on
107 aManifestobtained from a jar file,nullwill be returned. While jar files
108 themselves do not allownull-named attributes, it is possible to invoke
109 (|java.util.jar.Manifest|) on aManifest, and on that result, invokeputwith a
110 null key and an arbitrary value. Subsequent invocations
111 ofgetAttributes(null)will return the just-putvalue.
113 Note that this method does not return the manifest's main attributes; see
114 (|java.util.jar.Manifest|) .
119 Returns: the Attributes for the specified entry name
121 *java.util.jar.Manifest.getEntries()*
123 public |java.util.Map|<String,Attributes> getEntries()
125 Returns a Map of the entries contained in this Manifest. Each entry is
126 represented by a String name (key) and associated Attributes (value). The Map
127 permits thenullkey, but no entry with a null key is created by
128 (|java.util.jar.Manifest|) , nor is such an entry written by using
129 (|java.util.jar.Manifest|) .
133 Returns: a Map of the entries contained in this Manifest
135 *java.util.jar.Manifest.getMainAttributes()*
137 public |java.util.jar.Attributes| getMainAttributes()
139 Returns the main Attributes for the Manifest.
143 Returns: the main Attributes for the Manifest
145 *java.util.jar.Manifest.hashCode()*
147 public int hashCode()
149 Returns the hash code for this Manifest.
153 *java.util.jar.Manifest.read(InputStream)*
155 public void read(java.io.InputStream is)
156 throws |java.io.IOException|
158 Reads the Manifest from the specified InputStream. The entry names and
159 attributes read will be merged in with the current manifest entries.
162 is - the input stream
164 *java.util.jar.Manifest.write(OutputStream)*
166 public void write(java.io.OutputStream out)
167 throws |java.io.IOException|
169 Writes the Manifest to the specified OutputStream.
170 Attributes.Name.MANIFEST_VERSION must be set in MainAttributes prior to
171 invoking this method.
174 out - the output stream