1 @deftypemethod Attributes {public String} getValue (java.lang.String@w{ }@var{name})
2 Gets the value of an attribute name given as a String.
4 @deftypemethod Attributes {public String} getValue (java.util.jar.Attributes.Name@w{ }@var{name})
5 Gets the value of the given attribute name.
7 @deftypemethod Attributes {public String} putValue (java.lang.String@w{ }@var{name}, java.lang.String@w{ }@var{value})
8 Stores an attribute name (represented by a String) and value in this
10 When the (case insensitive string) name already exists the value is
11 replaced and the old value is returned.
13 @deftypemethod Attributes {public Object} clone ()
14 Return a clone of this attribute map.
16 @deftypemethod Attributes {public void} clear ()
17 Removes all attributes.
19 @deftypemethod Attributes {public boolean} containsKey (java.lang.Object@w{ }@var{attrName})
20 Checks to see if there is an attribute with the specified name.
21 XXX - what if the object is a String?
23 @deftypemethod Attributes {public boolean} containsValue (java.lang.Object@w{ }@var{attrValue})
24 Checks to see if there is an attribute name with the specified value.
26 @deftypemethod Attributes {public Set} entrySet ()
27 Gives a Set of attribute name and values pairs as MapEntries.
29 @deftypemethod Attributes {public boolean} equals (java.lang.Object@w{ }@var{o})
30 Checks to see if two Attributes are equal. The supplied object must be
31 a real instance of Attributes and contain the same attribute name/value
34 @deftypemethod Attributes {public Object} get (java.lang.Object@w{ }@var{attrName})
35 Gets the value of a specified attribute name.
36 XXX - what if the object is a String?
38 @deftypemethod Attributes {public int} hashCode ()
39 Returns the hashcode of the attribute name/value map.
41 @deftypemethod Attributes {public boolean} isEmpty ()
42 Returns true if there are no attributes set, false otherwise.
44 @deftypemethod Attributes {public Set} keySet ()
45 Gives a Set of all the values of defined attribute names.
47 @deftypemethod Attributes {public Object} put (java.lang.Object@w{ }@var{name}, java.lang.Object@w{ }@var{value})
48 Adds or replaces a attribute name/value pair.
49 XXX - What if the name is a string? What if the name is neither a Name
50 nor a String? What if the value is not a string?
52 @deftypemethod Attributes {public void} putAll (java.util.Map@w{ }@var{attr})
53 Adds or replaces all attribute name/value pairs from another
54 Attributes object to this one. The supplied Map must be an instance of
57 @deftypemethod Attributes {public Object} remove (java.lang.Object@w{ }@var{name})
58 Remove a attribute name/value pair.
59 XXX - What if the name is a String?
61 @deftypemethod Attributes {public int} size ()
62 Returns the number of defined attribute name/value pairs.
64 @deftypemethod Attributes {public Collection} values ()
65 Returns all the values of the defined attribute name/value pairs as a
68 @deftypemethod Attributes.Name {public int} hashCode ()
69 Returns the hash code of the (lowercase) String representation of
72 @deftypemethod Attributes.Name {public boolean} equals (java.lang.Object@w{ }@var{o})
73 Checks if another object is equal to this Name object.
74 Another object is equal to this Name object if it is an instance of
75 Name and the (lowercase) string representation of the name is equal.
77 @deftypemethod Attributes.Name {public String} toString ()
78 Returns the string representation of this Name as given to the
79 constructor (not neccesarily the lower case representation).
81 @deftypemethod JarEntry {public Attributes} getAttributes () @*throws IOException
82 Returns a copy of the Attributes set for this entry.
83 When no Attributes are set in the manifest null is returned.
85 @deftypemethod JarEntry {public Certificate} getCertificates ()
86 Returns a copy of the certificates set for this entry.
87 When no certificates are set or when not all data of this entry has
88 been read null is returned.
92 To make sure that this call returns a valid value you must read all
93 data from the JarInputStream for this entry.
94 When you don't need the data for an entry but want to know the
95 certificates that are set for the entry then you can skip all data by
96 calling @code{skip(entry.getSize())} on the JarInputStream for
99 @deftypemethod JarFile {public Enumeration} entries () @*throws IllegalStateException
100 Returns a enumeration of all the entries in the JarFile.
101 Note that also the Jar META-INF entries are returned.
103 @deftypemethod JarFile {public ZipEntry} getEntry (java.lang.String@w{ }@var{name})
105 It actually returns a JarEntry not a zipEntry
107 @deftypemethod JarFile {public synchronized InputStream} getInputStream (java.util.zip.ZipEntry@w{ }@var{entry}) @*throws ZipException, IOException
108 XXX should verify the inputstream
110 @deftypemethod JarFile {public JarEntry} getJarEntry (java.lang.String@w{ }@var{name})
111 Returns the JarEntry that belongs to the name if such an entry
112 exists in the JarFile. Returns null otherwise
113 Convenience method that just casts the result from @code{getEntry}
116 @deftypemethod JarFile {public Manifest} getManifest ()
117 Returns the manifest for this JarFile or null when the JarFile does not
118 contain a manifest file.
120 @deftypemethod JarInputStream {protected ZipEntry} createZipEntry (java.lang.String@w{ }@var{name})
121 Creates a JarEntry for a particular name and consults the manifest
122 for the Attributes of the entry.
123 Used by @code{ZipEntry.getNextEntry()}
125 @deftypemethod JarInputStream {public Manifest} getManifest ()
126 Returns the Manifest for the jar file or null if there was no Manifest.
128 @deftypemethod JarInputStream {public ZipEntry} getNextEntry () @*throws IOException
129 Returns the next entry or null when there are no more entries.
130 Does actually return a JarEntry, if you don't want to cast it yourself
131 use @code{getNextJarEntry()}. Does not return any entries found
132 at the beginning of the ZipFile that are special
133 (those that start with "META-INF/").
135 @deftypemethod JarInputStream {public JarEntry} getNextJarEntry () @*throws IOException
136 Returns the next jar entry or null when there are no more entries.
138 @deftypemethod JarInputStream {public int} read (byte[]@w{ }@var{buf}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
141 @deftypemethod JarOutputStream {public void} putNextEntry (java.util.zip.ZipEntry@w{ }@var{entry}) @*throws IOException
142 Prepares the JarOutputStream for writing the next entry.
143 This implementation just calls @code{super.putNextEntre()}.
145 @deftypemethod Manifest {public Attributes} getMainAttributes ()
146 Gets the main attributes of this Manifest.
148 @deftypemethod Manifest {public Map} getEntries ()
149 Gets a map of entry Strings to Attributes for all the entries described
150 in this manifest. Adding, changing or removing from this entries map
151 changes the entries of this manifest.
153 @deftypemethod Manifest {public Attributes} getAttributes (java.lang.String@w{ }@var{entryName})
154 Returns the Attributes associated with the Entry.
159 @code{return (Attributes)getEntries().get(entryName)}
161 @deftypemethod Manifest {public void} clear ()
162 Clears the main attributes and removes all the entries from the
165 @deftypemethod Manifest {public void} read (java.io.InputStream@w{ }@var{in}) @*throws IOException
168 @deftypemethod Manifest {public void} write (java.io.OutputStream@w{ }@var{out}) @*throws IOException
171 @deftypemethod Manifest {public Object} clone ()
172 Makes a deep copy of the main attributes, but a shallow copy of
173 the other entries. This means that you can freely add, change or remove
174 the main attributes or the entries of the new manifest without effecting
175 the original manifest, but adding, changing or removing attributes from
176 a particular entry also changes the attributes of that entry in the
177 original manifest. Calls @code{new Manifest(this)}.
179 @deftypemethod Manifest {public boolean} equals (java.lang.Object@w{ }@var{o})
180 Checks if another object is equal to this Manifest object.
181 Another Object is equal to this Manifest object if it is an instance of
182 Manifest and the main attributes and the entries of the other manifest
183 are equal to this one.
185 @deftypemethod Manifest {public int} hashCode ()
186 Calculates the hash code of the manifest. Implemented by a xor of the
187 hash code of the main attributes with the hash code of the entries map.