|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.plexus.archiver.jar.Manifest.Attribute
public static class Manifest.Attribute
An attribute for the manifest. Those attributes that are not nested into a section will be added to the "Main" section.
| Constructor Summary | |
|---|---|
Manifest.Attribute()
Construct an empty attribute |
|
Manifest.Attribute(String line)
Construct an attribute by parsing a line from the Manifest |
|
Manifest.Attribute(String name,
String value)
Construct a manifest by specifying its name and value |
|
| Method Summary | |
|---|---|
void |
addContinuation(String line)
Add a continuation line from the Manifest file. |
void |
addValue(String value)
Add a new value to this attribute - making it multivalued. |
boolean |
equals(Object rhs)
|
String |
getKey()
Get the attribute's Key - its name in lower case. |
String |
getName()
Get the Attribute's name |
String |
getValue()
Get the Attribute's value. |
Enumeration |
getValues()
Get all the attribute's values. |
int |
hashCode()
|
void |
parse(String line)
Parse a line into name and value pairs |
void |
setName(String name)
Set the Attribute's name; required |
void |
setValue(String value)
Set the Attribute's value; required |
void |
write(PrintWriter writer)
Write the attribute out to a print writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Manifest.Attribute()
public Manifest.Attribute(String line)
throws ManifestException
line - the line containing the attribute name and value
ManifestException - if the line is not valid
public Manifest.Attribute(String name,
String value)
name - the attribute's namevalue - the Attribute's value| Method Detail |
|---|
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object rhs)
equals in class ObjectObject.equals(java.lang.Object)
public void parse(String line)
throws ManifestException
line - the line to be parsed
ManifestException - if the line does not contain a colon
separating the name and valuepublic void setName(String name)
name - the attribute's namepublic String getName()
public String getKey()
public void setValue(String value)
value - the attribute's valuepublic String getValue()
public void addValue(String value)
value - the attribute's additional valuepublic Enumeration getValues()
public void addContinuation(String line)
line - the continuation line.
public void write(PrintWriter writer)
throws IOException
writer - the Writer to which the attribute is written
IOException - if the attribute value cannot be written
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||