Interface InputStreamSupport
-
- All Known Implementing Classes:
JSONConfiguration
,XMLConfiguration
,YAMLConfiguration
public interface InputStreamSupport
Definition of an interface to be implemented by objects which support reading from an input stream.
When reading data using a
FileHandler
per default a reader is used as defined by theFileBased.read(java.io.Reader)
method. For some configuration formats it is necessary to directly read binary data. In order to achieve this, aFileBased
object can also implement this interface. It defines an additionalread()
method expecting anInputStream
as argument. If theFileHandler
detects that its associatedFileBased
object implements this interface, it passes the input stream directly rather than transforming it to a reader.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
read(java.io.InputStream in)
Reads the content of this object from the specifiedInputStream
.
-
-
-
Method Detail
-
read
void read(java.io.InputStream in) throws ConfigurationException, java.io.IOException
Reads the content of this object from the specifiedInputStream
.- Parameters:
in
- the input stream- Throws:
ConfigurationException
- if a non-I/O related problem occurs, e.g. the data read does not have the expected formatjava.io.IOException
- if an I/O error occurs.
-
-