Attributes

public class Attributes extends Object
implements Map<ObjectObject> Cloneable

The Attributes class maps Manifest attribute names to associated string values. Valid attribute names are case-insensitive, are restricted to the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed 70 characters in length. Attribute values can contain any characters and will be UTF8-encoded when written to the output stream. See the JAR File Specification for more information about valid attribute names and values.

See Also

Nested Class Summary

class Attributes.Name The Attributes.Name class represents an attribute name stored in this Map. 

Field Summary

protected Map<ObjectObject> map The attribute name-value mappings.

Public Constructor Summary

Attributes()
Constructs a new, empty Attributes object with default size.
Attributes(int size)
Constructs a new, empty Attributes object with the specified initial size.
Attributes(Attributes attr)
Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.

Public Method Summary

void
clear()
Removes all attributes from this Map.
Object
clone()
Returns a copy of the Attributes, implemented as follows:
     public Object clone() { return new Attributes(this); }
 
Since the attribute names and values are themselves immutable, the Attributes returned can be safely modified without affecting the original.
boolean