Read and write properties
The following methods are defined in the extended DataSource interface
for reading and writing properties. These methods allow you to define
a new DataSource object by editing the property list of an
existing DataSource object.
public Properties getDsProperties();
Returns
the Property object contained in the DataSource object
public void addProp(String key, Object value);
Adds a property to the property list
The key parameter specifies which property is to be added.
The value parameter
is the value of the property.
public Object getProp(String key);
Gets the value of a property from the property list
The key parameter
specifies which property is to be retrieved.
public void removeProperty(String key);
Removes a property from the property list
The key parameter specifies
which property is to be removed.
public void readProperties(InputStream in) throws IOException;
Reads properties into a DataSource object from an InputStream object
The in parameter is the InputStream object from which the properties are to be read.
An exception occurs when an I/O error is encountered
while reading from the input stream.
public void writeProperties(OutputStream out) throws IOException;
Writes the properties of the DataSource object to an OutputStream object
The out parameter is the OutputStream object to which the properties are to be written.
An exception occurs when an I/O error is encountered while writing to the output stream.