org.springframework.util
Interface PropertiesPersister

All Known Implementing Classes:
DefaultPropertiesPersister

public interface PropertiesPersister

Strategy interface for persisting java.util.Properties, allowing for pluggable parsing strategies.

The default implementation is DefaultPropertiesPersister, providing java.util.Properties' native parsing, but allowing for reading from any Reader and writing to any Writer, for example to specify a charset for a properties file.

Since:
10.03.2004
Author:
Juergen Hoeller
See Also:
DefaultPropertiesPersister, 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 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.
 

Method Detail

load

public void load(Properties props,
                 InputStream is)
          throws IOException
Load properties from the given InputStream into the given Properties object.

Parameters:
props - the Properties object to load into
is - the InputStream to load from
Throws:
IOException - in case of I/O errors
See Also:
Properties.load(java.io.InputStream)

load

public void load(Properties props,
                 Reader reader)
          throws IOException
Load properties from the given Reader into the given Properties object.

Parameters:
props - the Properties object to load into
reader - the Reader to load from
Throws:
IOException - in case of I/O errors

store

public void store(Properties props,
                  OutputStream os,
                  String header)
           throws IOException
Write the contents of the given Properties object to the given OutputStream.

Parameters:
props - the Properties object to store
os - the OutputStream to write to
header - the description of the property list
Throws:
IOException - in case of I/O errors
See Also:
Properties.store(java.io.OutputStream, java.lang.String)

store

public void store(Properties props,
                  Writer writer,
                  String header)
           throws IOException
Write the contents of the given Properties object to the given Writer.

Parameters:
props - the Properties object to store
writer - the Writer to write to
header - the description of the property list
Throws:
IOException - in case of I/O errors


Copyright (C) 2003-2004 The Spring Framework Project.