org.springframework.util

## 接口 PropertiesPersister

- 所有已知实现类:
    DefaultPropertiesPersister

      public interface PropertiesPersister

  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).

  从以下版本开始:
    10.03.2004
  作者:
    Juergen Hoeller
  另请参阅:
    `DefaultPropertiesPersister`, `Properties`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `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,
                    InputStream is)
             throws IOException

      Load properties from the given InputStream into the given Properties object.
      参数:
        `props` - the Properties object to load into
        `is` - the InputStream to load from
      抛出:
        `IOException` - in case of I/O errors
      另请参阅:
        `Properties.load(java.io.Reader)`

    - #### load

          void load(Properties props,
                    Reader reader)
             throws IOException

      Load properties from the given Reader into the given Properties object.
      参数:
        `props` - the Properties object to load into
        `reader` - the Reader to load from
      抛出:
        `IOException` - in case of I/O errors

    - #### store

          void store(Properties props,
                     OutputStream os,
                     String header)
              throws IOException

      Write the contents of the given Properties object to the given OutputStream.
      参数:
        `props` - the Properties object to store
        `os` - the OutputStream to write to
        `header` - the description of the property list
      抛出:
        `IOException` - in case of I/O errors
      另请参阅:
        `Properties.store(java.io.Writer, java.lang.String)`

    - #### store

          void store(Properties props,
                     Writer writer,
                     String header)
              throws IOException

      Write the contents of the given Properties object to the given Writer.
      参数:
        `props` - the Properties object to store
        `writer` - the Writer to write to
        `header` - the description of the property list
      抛出:
        `IOException` - in case of I/O errors

    - #### loadFromXml

          void loadFromXml(Properties props,
                           InputStream is)
                    throws IOException

      Load properties from the given XML InputStream into the given Properties object.
      参数:
        `props` - the Properties object to load into
        `is` - the InputStream to load from
      抛出:
        `IOException` - in case of I/O errors
      另请参阅:
        `Properties.loadFromXML(java.io.InputStream)`

    - #### storeToXml

          void storeToXml(Properties props,
                          OutputStream os,
                          String header)
                   throws IOException

      Write the contents of the given Properties object to the given XML OutputStream.
      参数:
        `props` - the Properties object to store
        `os` - the OutputStream to write to
        `header` - the description of the property list
      抛出:
        `IOException` - in case of I/O errors
      另请参阅:
        `Properties.storeToXML(java.io.OutputStream, String)`

    - #### storeToXml

          void storeToXml(Properties props,
                          OutputStream os,
                          String header,
                          String encoding)
                   throws IOException

      Write the contents of the given Properties object to the given XML OutputStream.
      参数:
        `props` - the Properties object to store
        `os` - the OutputStream to write to
        `encoding` - the encoding to use
        `header` - the description of the property list
      抛出:
        `IOException` - in case of I/O errors
      另请参阅:
        `Properties.storeToXML(java.io.OutputStream, String, String)`