Java Doc for Properties.java in  » Apache-Harmony-Java-SE » java-package » java » util » 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 » Apache Harmony Java SE » java package » java.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.Properties

Properties
public class Properties extends Hashtable (Code)
Properties is a Hashtable where the keys and values must be Strings. Each Properties can have a default Properties which specifies the default values which are used if the key is not in this Properties.
See Also:   Hashtable
See Also:   java.lang.System.getProperties


Field Summary
protected  Propertiesdefaults
     The default values for this Properties.

Constructor Summary
public  Properties()
     Constructs a new Properties object.
public  Properties(Properties properties)
     Constructs a new Properties object using the specified default properties.

Method Summary
public  StringgetProperty(String name)
     Searches for the property with the specified name.
public  StringgetProperty(String name, String defaultValue)
     Searches for the property with the specified name.
public  voidlist(PrintStream out)
     Lists the mappings in this Properties to the specified PrintStream in a human readable form.
public  voidlist(PrintWriter writer)
     Lists the mappings in this Properties to the specified PrintWriter in a human readable form.
public synchronized  voidload(InputStream in)
     Loads properties from the specified InputStream.
public synchronized  voidloadFromXML(InputStream in)
    
public  EnumerationpropertyNames()
     Answers all of the property names that this Properties contains.
public  voidsave(OutputStream out, String comment)
     Saves the mappings in this Properties to the specified OutputStream, putting the specified comment at the beginning.
public  ObjectsetProperty(String name, String value)
     Maps the specified key to the specified value.
public synchronized  voidstore(OutputStream out, String comment)
     Stores the mappings in this Properties to the specified OutputStream, putting the specified comment at the beginning.
public  voidstoreToXML(OutputStream os, String comment)
    
public synchronized  voidstoreToXML(OutputStream os, String comment, String encoding)
    

Field Detail
defaults
protected Properties defaults(Code)
The default values for this Properties.




Constructor Detail
Properties
public Properties()(Code)
Constructs a new Properties object.



Properties
public Properties(Properties properties)(Code)
Constructs a new Properties object using the specified default properties.
Parameters:
  properties - the default properties




Method Detail
getProperty
public String getProperty(String name)(Code)
Searches for the property with the specified name. If the property is not found, look in the default properties. If the property is not found in the default properties, answer null.
Parameters:
  name - the name of the property to find the named property value



getProperty
public String getProperty(String name, String defaultValue)(Code)
Searches for the property with the specified name. If the property is not found, look in the default properties. If the property is not found in the default properties, answer the specified default.
Parameters:
  name - the name of the property to find
Parameters:
  defaultValue - the default value the named property value



list
public void list(PrintStream out)(Code)
Lists the mappings in this Properties to the specified PrintStream in a human readable form.
Parameters:
  out - the PrintStream



list
public void list(PrintWriter writer)(Code)
Lists the mappings in this Properties to the specified PrintWriter in a human readable form.
Parameters:
  writer - the PrintWriter



load
public synchronized void load(InputStream in) throws IOException(Code)
Loads properties from the specified InputStream. The properties are of the form key=value, one property per line.
Parameters:
  in - the input stream
throws:
  IOException -



loadFromXML
public synchronized void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException(Code)



propertyNames
public Enumeration propertyNames()(Code)
Answers all of the property names that this Properties contains. an Enumeration containing the names of all properties



save
public void save(OutputStream out, String comment)(Code)
Saves the mappings in this Properties to the specified OutputStream, putting the specified comment at the beginning. The output from this method is suitable for being read by the load() method.
Parameters:
  out - the OutputStream
Parameters:
  comment - the comment
exception:
  ClassCastException - when the key or value of a mapping is not a String



setProperty
public Object setProperty(String name, String value)(Code)
Maps the specified key to the specified value. If the key already exists, the old value is replaced. The key and value cannot be null.
Parameters:
  name - the key
Parameters:
  value - the value the old value mapped to the key, or null



store
public synchronized void store(OutputStream out, String comment) throws IOException(Code)
Stores the mappings in this Properties to the specified OutputStream, putting the specified comment at the beginning. The output from this method is suitable for being read by the load() method.
Parameters:
  out - the OutputStream
Parameters:
  comment - the comment
throws:
  IOException -
exception:
  ClassCastException - when the key or value of a mapping is not a String



storeToXML
public void storeToXML(OutputStream os, String comment) throws IOException(Code)



storeToXML
public synchronized void storeToXML(OutputStream os, String comment, String encoding) throws IOException(Code)



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