org.codehaus.plexus.archiver.jar
public static class Manifest.Section extends Object
Field Summary | |
---|---|
Vector | attributeIndex
Index used to retain the attribute ordering |
Hashtable | attributes
The section's attributes. |
String | name
The section's name if any. |
Vector | warnings
Warnings for this section |
Method Summary | |
---|---|
String | addAttributeAndCheck(Manifest.Attribute attribute)
Add an attribute to the section
|
void | addConfiguredAttribute(Manifest.Attribute attribute)
Add an attribute to the section.
|
Object | clone()
Clone this section
|
boolean | equals(Object rhs) |
Manifest.Attribute | getAttribute(String attributeName)
Get a attribute of the section
|
Enumeration | getAttributeKeys()
Get the attribute keys.
|
String | getAttributeValue(String attributeName)
Get the value of the attribute with the name given.
|
String | getName()
Get the Section's name.
|
Enumeration | getWarnings()
Get the warnings for this section.
|
int | hashCode() |
void | merge(Manifest.Section section)
Merge in another section
|
String | read(BufferedReader reader)
Read a section through a reader.
|
void | removeAttribute(String attributeName)
Remove tge given attribute from the section
|
void | setName(String name)
The name of the section; optional -default is the main section.
|
void | storeAttribute(Manifest.Attribute attribute)
Store an attribute and update the index.
|
void | write(PrintWriter writer)
Write the section out to a print writer.
|
Parameters: attribute the attribute to be added.
Returns: the value of the attribute if it is a name attribute - null other wise
Throws: ManifestException if the attribute already exists in this section.
Parameters: attribute the attribute to be added to the section
Throws: ManifestException if the attribute is not valid.
Returns: the cloned Section
Since: Ant 1.5.2
See Also: java.lang.Object#equals
Parameters: attributeName the name of the attribute
Returns: a Manifest.Attribute instance if the attribute is single-valued, otherwise a Vector of Manifest.Attribute instances.
Returns: an Enumeration of Strings, each string being the lower case key of an attribute of the section.
Parameters: attributeName the name of the attribute to be returned.
Returns: the attribute's value or null if the attribute does not exist in the section
Returns: the section's name.
Returns: an Enumeration of warning strings.
See Also: java.lang.Object#hashCode
Parameters: section the section to be merged with this one.
Throws: ManifestException if the sections cannot be merged.
Parameters: reader the reader from which the section is read
Returns: the name of the next section if it has been read as part of this section - This only happens if the Manifest is malformed.
Throws: ManifestException if the section is not valid according to the JAR spec IOException if the section cannot be read from the reader.
Parameters: attributeName the name of the attribute to be removed.
Parameters: name the section's name
Parameters: attribute the attribute to be stored
Parameters: writer the Writer to which the section is written
Throws: IOException if the section cannot be written