Java Reference
In-Depth Information
public Object setProperty(String key, String value)
Adds the property key to the map with the given value . This
only affects the Properties object on which it is invokedthe de-
fault Properties object (if any) is unaffected. Returns the pre-
vious value that was mapped to this key, or null if there was
none.
public void store(OutputStream out, String header) throws IOExcep-
tion
Saves properties to an OutputStream . This only works if this
Properties object contains only string keys and values (as the
specification says it must); otherwise you get a ClassCastEx-
ception . If not null , the header string is written to the output
stream as a single-line comment. Do not use a multiline head-
er string, or else the saved properties will not be loadable.
Only properties in this object are saved to the file; the default
Properties object (if any) is not saved.
public void load(InputStream in) throws IOException
Loads properties from an InputStream . The property list is pre-
sumed to have been created previously by store . This method
puts values into this Properties object; it does not set values
in the default Properties object.
public Enumeration<?> propertyNames()
Enumerates the keys, including those of any default Proper-
ties object. This method provides a snapshot, and hence can
be expensive. The inherited keys method, by contrast, returns
only those properties defined in this object itself.
public void list(PrintWriter out)
 
Search WWH ::




Custom Search