Java Doc for Attributes.java in  » 6.0-JDK-Modules » j2me » java » util » jar » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.util.jar 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.jar.Attributes

Attributes
public class Attributes implements Map,Cloneable(Code)
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.
author:
   David Connelly
version:
   1.47, 06/24/03
See Also:   Manifest
since:
   1.2

Inner Class :public static class Name

Field Summary
protected  Mapmap
     The attribute name-value mappings.

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

Method Summary
public  voidclear()
     Removes all attributes from this Map.
public  Objectclone()
     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.
public  booleancontainsKey(Object name)
     Returns true if this Map contains the specified attribute name (key).
public  booleancontainsValue(Object value)
     Returns true if this Map maps one or more attribute names (keys) to the specified value.
public  SetentrySet()
     Returns a Collection view of the attribute name-value mappings contained in this Map.
public  booleanequals(Object o)
     Compares the specified Attributes object with this Map for equality.
public  Objectget(Object name)
     Returns the value of the specified attribute name, or null if the attribute name was not found.
public  StringgetValue(String name)
     Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found.
public  StringgetValue(Name name)
     Returns the value of the specified Attributes.Name, or null if the attribute was not found.
public  inthashCode()
     Returns the hash code value for this Map.
public  booleanisEmpty()
     Returns true if this Map contains no attributes.
public  SetkeySet()
     Returns a Set view of the attribute names (keys) contained in this Map.
public  Objectput(Object name, Object value)
     Associates the specified value with the specified attribute name (key) in this Map.
public  voidputAll(Map attr)
     Copies all of the attribute name-value mappings from the specified Attributes to this Map.
public  StringputValue(String name, String value)
     Associates the specified value with the specified attribute name, specified as a String.
 voidread(Manifest.FastInputStream is, byte[] lbuf)
    
public  Objectremove(Object name)
     Removes the attribute with the specified name (key) from this Map.
public  intsize()
     Returns the number of attributes in this Map.
public  Collectionvalues()
     Returns a Collection view of the attribute values contained in this Map.
 voidwrite(DataOutputStream os)
    
 voidwriteMain(DataOutputStream out)
    

Field Detail
map
protected Map map(Code)
The attribute name-value mappings.




Constructor Detail
Attributes
public Attributes()(Code)
Constructs a new, empty Attributes object with default size.



Attributes
public Attributes(int size)(Code)
Constructs a new, empty Attributes object with the specified initial size.
Parameters:
  size - the initial number of attributes



Attributes
public Attributes(Attributes attr)(Code)
Constructs a new Attributes object with the same attribute name-value mappings as in the specified Attributes.
Parameters:
  attr - the specified Attributes




Method Detail
clear
public void clear()(Code)
Removes all attributes from this Map.



clone
public Object clone()(Code)
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.



containsKey
public boolean containsKey(Object name)(Code)
Returns true if this Map contains the specified attribute name (key).
Parameters:
  name - the attribute name true if this Map contains the specified attribute name



containsValue
public boolean containsValue(Object value)(Code)
Returns true if this Map maps one or more attribute names (keys) to the specified value.
Parameters:
  value - the attribute value true if this Map maps one or more attribute names tothe specified value



entrySet
public Set entrySet()(Code)
Returns a Collection view of the attribute name-value mappings contained in this Map.



equals
public boolean equals(Object o)(Code)
Compares the specified Attributes object with this Map for equality. Returns true if the given object is also an instance of Attributes and the two Attributes objects represent the same mappings.
Parameters:
  o - the Object to be compared true if the specified Object is equal to this Map



get
public Object get(Object name)(Code)
Returns the value of the specified attribute name, or null if the attribute name was not found.
Parameters:
  name - the attribute name the value of the specified attribute name, or null ifnot found.



getValue
public String getValue(String name)(Code)
Returns the value of the specified attribute name, specified as a string, or null if the attribute was not found. The attribute name is case-insensitive.

This method is defined as:

 return (String)get(new Attributes.Name((String)name));
 

Parameters:
  name - the attribute name as a string the String value of the specified attribute name, or null ifnot found.
throws:
  IllegalArgumentException - if the attribute name is invalid



getValue
public String getValue(Name name)(Code)
Returns the value of the specified Attributes.Name, or null if the attribute was not found.

This method is defined as:

 return (String)get(name);
 

Parameters:
  name - the Attributes.Name object the String value of the specified Attribute.Name, or null ifnot found.



hashCode
public int hashCode()(Code)
Returns the hash code value for this Map.



isEmpty
public boolean isEmpty()(Code)
Returns true if this Map contains no attributes.



keySet
public Set keySet()(Code)
Returns a Set view of the attribute names (keys) contained in this Map.



put
public Object put(Object name, Object value)(Code)
Associates the specified value with the specified attribute name (key) in this Map. If the Map previously contained a mapping for the attribute name, the old value is replaced.
Parameters:
  name - the attribute name
Parameters:
  value - the attribute value the previous value of the attribute, or null if none
exception:
  ClassCastException - if the name is not a Attributes.Nameor the value is not a String



putAll
public void putAll(Map attr)(Code)
Copies all of the attribute name-value mappings from the specified Attributes to this Map. Duplicate mappings will be replaced.
Parameters:
  attr - the Attributes to be stored in this map
exception:
  ClassCastException - if attr is not an Attributes



putValue
public String putValue(String name, String value)(Code)
Associates the specified value with the specified attribute name, specified as a String. The attributes name is case-insensitive. If the Map previously contained a mapping for the attribute name, the old value is replaced.

This method is defined as:

 return (String)put(new Attributes.Name(name), value);
 

Parameters:
  name - the attribute name as a string
Parameters:
  value - the attribute value the previous value of the attribute, or null if none
exception:
  IllegalArgumentException - if the attribute name is invalid



read
void read(Manifest.FastInputStream is, byte[] lbuf) throws IOException(Code)



remove
public Object remove(Object name)(Code)
Removes the attribute with the specified name (key) from this Map. Returns the previous attribute value, or null if none.
Parameters:
  name - attribute name the previous value of the attribute, or null if none



size
public int size()(Code)
Returns the number of attributes in this Map.



values
public Collection values()(Code)
Returns a Collection view of the attribute values contained in this Map.



write
void write(DataOutputStream os) throws IOException(Code)



writeMain
void writeMain(DataOutputStream out) throws IOException(Code)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.