org.apache.commons.configuration2.io

## Interface FileBased

- All Known Subinterfaces:
    FileBasedConfiguration
  All Known Implementing Classes:
    INIConfiguration, PatternSubtreeConfigurationWrapper, PropertiesConfiguration, PropertyListConfiguration, XMLConfiguration, XMLPropertiesConfiguration, XMLPropertyListConfiguration

      public interface FileBased

  Definition of an interface to be implemented by objects which know how to read and write themselves from or to a character stream.

  This interface is implemented by special implementations of the `Configuration` interface which are associated with a file. It demands only basic methods for doing I/O based on character stream objects. Based on these methods it is possible to implement other methods which operate on files, file names, URLs, etc.

  Version:
    $Id: FileBased.java 1624601 2014-09-12 18:04:36Z oheger $

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `read(Reader in)` Reads the content of this object from the given reader.
    `void` | `write(Writer out)` Writes the content of this object to the given writer.

- - ### Method Detail

    - #### read

          void read(Reader in)
             throws ConfigurationException,
                    IOException

      Reads the content of this object from the given reader.
      Parameters:
        `in` - the reader
      Throws:
        `IOException` - if an I/O error occurs
        `ConfigurationException` - if a non-I/O related problem occurs, e.g. the data read does not have the expected format

    - #### write

          void write(Writer out)
              throws ConfigurationException,
                     IOException

      Writes the content of this object to the given writer.
      Parameters:
        `out` - the writer
      Throws:
        `IOException` - if an I/O error occurs
        `ConfigurationException` - if a non-I/O related problem occurs, e.g. the data read does not have the expected format

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.