|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.jar.Manifest
public class Manifest
Reads, writes and manipulaties jar manifest files. XXX
| 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. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Manifest()
public Manifest(InputStream in)
throws IOException
in - the input stream to read the manifest from
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()| Method Detail |
|---|
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 up
public 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).
clone in class ObjectCloneablepublic boolean equals(Object o)
equals in class Objecto - the Object to compare to
Object.hashCode()public int hashCode()
hashCode in class ObjectObject.equals(Object),
System.identityHashCode(Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||