Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 834
نمايش فراداده

Attributesjava.util.jar

Java 1.2cloneable collection

This class is a java.util.Map that maps the attribute names of a JAR file manifest to arbitrary string values. The JAR manifest format specifies that attribute names can contain only the ASCII characters A to Z (uppercase and lowercase), the digits 0 through 9, and the hyphen and underscore characters. Thus, this class uses Attributes.Name as the type of attribute names, in addition to the more general String class. Although you can create your own Attributes objects, you more commonly obtain Attributes objects from a Manifest.

Figure 16-107. java.util.jar.Attributes

public class

Attributes implements java.util.Map<Object,Object>, Cloneable { // Public Constructors public

Attributes ( ); public

Attributes (java.util.jar.Attributes

attr ); public

Attributes (int

size ); // Nested Types public static class

Name ; // Public Instance Methods public String

getValue (String

name ); public String

getValue (Attributes.Name

name ); public String

putValue (String

name , String

value ); // Methods Implementing Map public void

clear ( ); public boolean

containsKey (Object

name ); public boolean

containsValue (Object

value ); public java.util.Set<java.util.Map.Entry<Object,Object>>

entrySet ( ); public boolean

equals (Object

o ); public Object

get (Object

name ); public int

hashCode ( ); public boolean

isEmpty ( ); default:true public java.util.Set<Object>

keySet ( ); public Object

put (Object

name , Object

value ); public void

putAll (java.util.Map<?,?>

attr ); public Object

remove (Object

name ); public int

size ( ); public java.util.Collection<Object>

values ( ); // Public Methods Overriding Object public Object

clone ( ); // Protected Instance Fields protected java.util.Map<Object,Object>

map ; }

Returned By

java.net.JarURLConnection.{getAttributes( ), getMainAttributes( )}, JarEntry.getAttributes( ), Manifest.{getAttributes( ), getMainAttributes( )}