Java Reference Index


  1. Introduction
  2. Data Types
  3. Arrays
  4. Operators
  5. Program Control
  6. Classes
  7. Objects
  8. Interfaces
  9. Containers
  10. Class Structure
  11. Error Handling

    Program Types

  12. Applications
  13. Applets

    How To

  14. Type Conversions

    Packages

  15. java.lang.reflect
  16. java.applet
  17. java.awt
  18. java.beans
  19. java.io
  20. java.lang
  21. java.math
  22. java.net
  23. java.rm
  24. java.security
  25. java.sa
  26. java.text
  27. java.util
  28. java.servlet

    Classes

  29. Object Class

    Appendices

  30. Terms
  31. Credits

java.util Package

Classes

Properties Class

Manages key/value pairs. The key is the name of a system attribute and the value is the value of the attribute. Methods:

  • boolean contains(Object value)
  • boolean containsKey(Object key) - A string should be passed to the method. Returns true if the key or value is in the Properties object.
  • elements()
  • getProperty(String key) - Get the value of the property specified by the key.
  • getProperty(String key, String default) - A default value is specified and is returned if the key is not found.
  • SecurityManager getSecurityManager() - gets the
  • keys()
  • list(PrintStream) - Write the properties to the stream.
  • list(PrintWriter) - Write the properties to the writer.
  • load(FileInputStream)
  • Enumeration propertyNames() - An Enumeration is returned with the keys and values.
  • put(Object key, Object value) - Place the key/value pair in the Properties object.
  • remove(Object key) - Take the key/value pair out of the Properties object
  • save(FileOutputStream, String) - Write the system properties to a file with a comment designated by the String.
  • setProperties(Properties)
  • size() - The number of key/value pairs is returned.

System properties:

  • file.separator
  • line.separator
  • path.separator
  • java.class.path
  • java.class.version
  • java.home
  • java.vendor
  • java.vendor.url
  • java.version
  • os.arch
  • os.name
  • user.dir
  • user.home
  • user.name