public class Manifest extends java.lang.Object implements java.lang.Cloneable
| Constructor and Description |
|---|
Manifest()
Creates a new empty Manifest.
|
Manifest(java.io.InputStream in)
Creates a Manifest from the supplied input stream.
|
Manifest(Manifest man)
Creates a Manifest from another Manifest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the main attributes and removes all the entries from the
manifest.
|
java.lang.Object |
clone()
Makes a deep copy of the main attributes, but a shallow copy of
the other entries.
|
boolean |
equals(java.lang.Object o)
Checks if another object is equal to this Manifest object.
|
Attributes |
getAttributes(java.lang.String entryName)
Returns the Attributes associated with the Entry.
|
java.util.Map<java.lang.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(java.io.InputStream in)
Read and merge a
Manifest from the designated input stream. |
void |
write(java.io.OutputStream out)
Writes the contents of this
Manifest to the designated
output stream. |
public Manifest()
public Manifest(java.io.InputStream in) throws java.io.IOException
in - the input stream to read the manifest fromjava.io.IOException - when an i/o exception occurs or the input stream
does not describe a valid manifestread(InputStream),
write(OutputStream)public Manifest(Manifest man)
man - the Manifest to copy fromclone()public Attributes getMainAttributes()
public java.util.Map<java.lang.String,Attributes> getEntries()
public Attributes getAttributes(java.lang.String entryName)
Implemented as:
return (Attributes)getEntries().get(entryName)
entryName - the name of the entry to look uppublic void clear()
public void read(java.io.InputStream in) throws java.io.IOException
Manifest from the designated input stream.in - the input stream to read from.java.io.IOException - if an I/O related exception occurs during the process.public void write(java.io.OutputStream out) throws java.io.IOException
Manifest to the designated
output stream. Line-endings are platform-independent and consist of the
2-codepoint sequence 0x0D and 0x0A.out - the output stream to write this Manifest to.java.io.IOException - if an I/O related exception occurs during the process.public java.lang.Object clone()
new Manifest(this).clone in class java.lang.ObjectCloneablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the Object to compare toObject.hashCode()public int hashCode()
hashCode in class java.lang.ObjectObject.equals(Object),
System.identityHashCode(Object)