edu.rice.cs.drjava.config
Class SavableConfiguration
java.lang.Object
edu.rice.cs.drjava.config.Configuration
edu.rice.cs.drjava.config.SavableConfiguration
- Direct Known Subclasses:
- FileConfiguration
public class SavableConfiguration
- extends Configuration
A Configuration object that can be read and saved from a Stream.
- Version:
- $Id: SavableConfiguration.java 4691 2008-12-02 23:33:27Z dlsmith $
Method Summary |
void |
loadConfiguration(InputStream is)
Creates an OptionMapLoader with the values loaded from the InputStream
(and defaults where values weren't specified) and loads them into
this Configuration's OptionMap. |
void |
saveConfiguration(OutputStream os,
String header)
Used to save the values from this Configuration into the given OutputStream
as a Properties file. |
SavableConfiguration
public SavableConfiguration(OptionMap map)
- Creates a new Configuration based on the given OptionMap.
- Parameters:
map
- an empty OptionMap
loadConfiguration
public void loadConfiguration(InputStream is)
throws IOException
- Creates an OptionMapLoader with the values loaded from the InputStream
(and defaults where values weren't specified) and loads them into
this Configuration's OptionMap.
- Parameters:
is
- InputStream containing properties-style keys and values
- Throws:
IOException
saveConfiguration
public void saveConfiguration(OutputStream os,
String header)
throws IOException
- Used to save the values from this Configuration into the given OutputStream
as a Properties file. The elements weren't ordered, so now the properties
are written in the same way as the about dialog.
Values equal to their defaults are not written to disk.
- Throws:
IOException