Constructor and Description |
---|
Manifest()
Creates a new
Manifest instance. |
Manifest(InputStream is)
Creates a new
Manifest instance using the attributes obtained
from the input stream. |
Manifest(Manifest man)
Creates a new
Manifest instance. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Resets the both the main attributes as well as the entry attributes
associated with this
Manifest . |
Object |
clone()
Creates a copy of this
Manifest . |
boolean |
equals(Object o)
Determines if the receiver is equal to the parameter object.
|
Attributes |
getAttributes(String name)
Returns the
Attributes associated with the parameter entry
name . |
Map<String,Attributes> |
getEntries()
Returns a map containing the
Attributes for each entry in the
Manifest . |
Attributes |
getMainAttributes()
Returns the main
Attributes of the JarFile . |
int |
hashCode()
Returns the hash code for this instance.
|
void |
read(InputStream is)
Merges name/attribute pairs read from the input stream
is into this manifest. |
void |
write(OutputStream os)
Writes out the attribute information of the receiver to the specified
OutputStream . |
public Manifest()
Manifest
instance.public Manifest(InputStream is) throws IOException
Manifest
instance using the attributes obtained
from the input stream.is
- InputStream
to parse for attributes.IOException
- if an IO error occurs while creating this Manifest
public Manifest(Manifest man)
Manifest
instance. The new instance will have the
same attributes as those found in the parameter Manifest
.man
- Manifest
instance to obtain attributes from.public void clear()
Manifest
.public Attributes getAttributes(String name)
Attributes
associated with the parameter entry
name
.name
- the name of the entry to obtain Attributes
from.null
if the entry does
not exist.public Map<String,Attributes> getEntries()
Attributes
for each entry in the
Manifest
.public Attributes getMainAttributes()
Attributes
of the JarFile
.Attributes
associated with the source JarFile
.public Object clone()
Manifest
. The returned Manifest
will equal the Manifest
from which it was cloned.public void write(OutputStream os) throws IOException
OutputStream
.os
- The OutputStream
to write to.IOException
- If an error occurs writing the Manifest
.public void read(InputStream is) throws IOException
is
into this manifest.is
- The InputStream
to read from.IOException
- If an error occurs reading the manifest.public int hashCode()
hashCode
in class Object
Manifest
's hashCode.Object.equals(java.lang.Object)
public boolean equals(Object o)
Manifest
s are equal if they have identical main attributes as well as
identical entry attributes.equals
in class Object
o
- the object to compare against.true
if the manifests are equal, false
otherwiseObject.hashCode()