All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.util.jar.Manifest

java.lang.Object
    |
    +----java.util.jar.Manifest

public class Manifest
extends Object
implements Cloneable
The Manifest class is used to maintain Manifest entry names and their associated Attributes. There are main Manifest Attributes as well as per-entry Attributes.

Since:
JDK1.2
See Also:
Attributes

Constructor Index

 o Manifest()
Constructs a new, empty Manifest.
 o Manifest(Manifest)
Constructs a new Manifest that is a copy of the specified Manifest.

Method Index

 o clear()
Clears the main Attributes as well as the entries in this Manifest.
 o clone()
Returns a shallow copy of this Manifest, implemented as follows:
     public Object clone() { return new Manifest(this); }
 
 o equals(Object)
Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.
 o getAttributes(String)
Returns the Attributes for the specified entry name.
 o getEntries()
Returns a Map of the entries contained in this Manifest.
 o getMainAttributes()
Returns the main Attributes for the Manifest.
 o read(InputStream)
Reads the Manifest from the specified InputStream.
 o write(OutputStream)
Writes the Manifest to the specified OutputStream.

Constructors

 o Manifest
public Manifest()
Constructs a new, empty Manifest.

 o Manifest
public Manifest(Manifest man)
Constructs a new Manifest that is a copy of the specified Manifest.

Parameters:
man - the Manifest to copy

Methods

 o getMainAttributes
public Attributes getMainAttributes()
Returns the main Attributes for the Manifest.

 o getEntries
public Map getEntries()
Returns a Map of the entries contained in this Manifest. Each entry is represented by a String name (key) and associated Attributes (value).

 o getAttributes
public Attributes getAttributes(String name)
Returns the Attributes for the specified entry name. This method is merely shorthand for the expression:
	    (Attributes)getEntries().get(name)
 

 o clear
public void clear()
Clears the main Attributes as well as the entries in this Manifest.

 o write
public void write(OutputStream out) throws IOException
Writes the Manifest to the specified OutputStream.

Parameters:
out - the output stream
Throws: IOException
if an I/O error has occurred
 o read
public void read(InputStream in) throws IOException
Reads the Manifest from the specified InputStream. The entry names and attributes read will be merged in with the current manifest entries.

Parameters:
in - the input stream
Throws: IOException
if an I/O error has occurred
 o equals
public boolean equals(Object o)
Returns true if the specified Object is also a Manifest and has the same main Attributes and entries.

Parameters:
o - the object to be compared
Overrides:
equals in class Object
 o clone
public Object clone()
Returns a shallow copy of this Manifest, implemented as follows:
     public Object clone() { return new Manifest(this); }
 

Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature