| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
public Manifest()
public Manifest(InputStream in) throws IOException
in - the input stream to read the manifest fromIOException - 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 Map<String,Attributes> getEntries()
public Attributes getAttributes(String entryName)
Implemented as:
return (Attributes)getEntries().get(entryName)
entryName - the name of the entry to look uppublic void clear()
public void read(InputStream in) throws IOException
Manifest from the designated input stream.in - the input stream to read from.IOException - if an I/O related exception occurs during the process.public void write(OutputStream out) throws 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.IOException - if an I/O related exception occurs during the process.public Object clone()
new Manifest(this).public boolean equals(Object o)
equals in class Objecto - the Object to compare toObject.hashCode()public int hashCode()
hashCode in class ObjectObject.equals(Object),
System.identityHashCode(Object)