org.codehaus.plexus.archiver.jar
public static class Manifest.Attribute extends Object
Field Summary | |
---|---|
int | currentIndex
For multivalued attributes, this is the index of the attribute
currently being defined. |
String | name
The attribute's name |
Vector | values
The attribute's value |
Constructor Summary | |
---|---|
Attribute()
Construct an empty attribute | |
Attribute(String line)
Construct an attribute by parsing a line from the 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.
|
void | writeLine(PrintWriter writer, String line)
Write a single Manifest line. |
void | writeValue(PrintWriter writer, String value)
Write a single attribute value out. |
Parameters: line the line containing the attribute name and value
Throws: ManifestException if the line is not valid
Parameters: name the attribute's name value the Attribute's value
Parameters: line the continuation line.
Parameters: value the attribute's additional value
See Also: java.lang.Object#equals
Returns: the attribute's key.
Returns: the attribute's name.
Returns: the attribute's value.
Returns: an enumeration of the attributes values
See Also: java.lang.Object#hashCode
Parameters: line the line to be parsed
Throws: ManifestException if the line does not contain a colon separating the name and value
Parameters: name the attribute's name
Parameters: value the attribute's value
Parameters: writer the Writer to which the attribute is written
Throws: IOException if the attribute value cannot be written
Parameters: writer the Writer to which the attribute is written line the manifest line to be written
Parameters: writer the Writer to which the attribute is written value the attribute value
Throws: IOException if the attribute value cannot be written