java.util.jar
public class Manifest extends Object implements Cloneable
Since: 1.2
Constructor Summary | |
---|---|
Manifest()
Creates a new empty Manifest. | |
Manifest(InputStream in)
Creates a Manifest from the supplied input stream.
| |
Manifest(Manifest man)
Creates a Manifest from another Manifest.
|
Method Summary | |
---|---|
void | clear()
Clears the main attributes and removes all the entries from the
manifest. |
Object | clone()
Makes a deep copy of the main attributes, but a shallow copy of
the other entries. |
boolean | equals(Object o)
Checks if another object is equal to this Manifest object.
|
Attributes | getAttributes(String entryName)
Returns the Attributes associated with the Entry.
|
Map<String,Attributes> | getEntries()
Gets a map of entry Strings to Attributes for all the entries described
in this manifest. |
Attributes | getMainAttributes()
Gets the main attributes of this Manifest. |
int | hashCode()
Calculates the hash code of the manifest. |
void | read(InputStream in)
Read and merge a Manifest from the designated input stream.
|
void | write(OutputStream out)
Writes the contents of this Manifest to the designated
output stream. |
Parameters: in the input stream to read the manifest from
Throws: IOException when an i/o exception occurs or the input stream does not describe a valid manifest
See Also: read
Parameters: man the Manifest to copy from
See Also: clone
new Manifest(this)
.
Implemented as:
return (Attributes)getEntries().get(entryName)
Parameters: entryName the name of the entry to look up
Returns: the attributes associated with the entry or null when none
Manifest
from the designated input stream.
Parameters: in the input stream to read from.
Throws: IOException if an I/O related exception occurs during the process.
Manifest
to the designated
output stream. Line-endings are platform-independent and consist of the
2-codepoint sequence 0x0D
and 0x0A
.
Parameters: out the output stream to write this Manifest
to.
Throws: IOException if an I/O related exception occurs during the process.