| org.springframework.util.PropertiesPersister
All known Subclasses: org.springframework.util.DefaultPropertiesPersister,
PropertiesPersister | public interface PropertiesPersister (Code) | | Strategy interface for persisting java.util.Properties ,
allowing for pluggable parsing strategies.
The default implementation is DefaultPropertiesPersister,
providing the native parsing of java.util.Properties ,
but allowing for reading from any Reader and writing to any Writer
(which allows to specify an encoding for a properties file).
As of Spring 1.2.2, this interface also supports properties XML files,
through the loadFromXml and storeToXml methods.
The default implementations delegate to JDK 1.5's corresponding methods.
author: Juergen Hoeller since: 10.03.2004 See Also: DefaultPropertiesPersister See Also: java.util.Properties |
Method Summary | |
void | load(Properties props, InputStream is) Load properties from the given InputStream into the given
Properties object. | void | load(Properties props, Reader reader) Load properties from the given Reader into the given
Properties object. | void | loadFromXml(Properties props, InputStream is) Load properties from the given XML InputStream into the
given Properties object. | void | store(Properties props, OutputStream os, String header) Write the contents of the given Properties object to the
given OutputStream. | void | store(Properties props, Writer writer, String header) Write the contents of the given Properties object to the
given Writer. | void | storeToXml(Properties props, OutputStream os, String header) Write the contents of the given Properties object to the
given XML OutputStream. | void | storeToXml(Properties props, OutputStream os, String header, String encoding) Write the contents of the given Properties object to the
given XML OutputStream. |
load | void load(Properties props, Reader reader) throws IOException(Code) | | Load properties from the given Reader into the given
Properties object.
Parameters: props - the Properties object to load into Parameters: reader - the Reader to load from throws: IOException - in case of I/O errors |
store | void store(Properties props, Writer writer, String header) throws IOException(Code) | | Write the contents of the given Properties object to the
given Writer.
Parameters: props - the Properties object to store Parameters: writer - the Writer to write to Parameters: header - the description of the property list throws: IOException - in case of I/O errors |
|
|