Interface FileBased
- All Known Subinterfaces:
FileBasedConfiguration
- All Known Implementing Classes:
INIConfiguration
,JSONConfiguration
,PatternSubtreeConfigurationWrapper
,PropertiesConfiguration
,PropertyListConfiguration
,XMLConfiguration
,XMLPropertiesConfiguration
,XMLPropertyListConfiguration
,YAMLConfiguration
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.
Note that the methods defined by this interface are not intended to be called directly by client
code! Rather, they are used internally when doing I/O operations with a FileHandler
. A
FileHandler
supports additional functionality (e.g. it evaluates some additional interfaces the
FileBased
object may implement); this functionality is not available on a direct method invocation, so this
may lead to unpredictable results.
-
Method Summary
-
Method Details
-
read
Reads the content of this object from the given reader. Client code should not call this method directly, but use aFileHandler
for reading data.- 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
Writes the content of this object to the given writer. Client code should not call this method directly, but use aFileHandler
for writing data.- 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
-