org.apache.commons.configuration2.io

## Interface InputStreamSupport

- All Known Implementing Classes:
    XMLConfiguration

      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 the `FileBased.read(java.io.Reader)` method. For some configuration formats it is necessary to directly read binary data. In order to achieve this, a `FileBased` object can also implement this interface. It defines an additional `read()` method expecting an `InputStream` as argument. If the `FileHandler` detects that its associated `FileBased` object implements this interface, it passes the input stream directly rather than transforming it to a reader.

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

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `read(InputStream in)` Reads the content of this object from the specified `InputStream`.

- - ### Method Detail

    - #### read

          void read(InputStream in)
                    throws ConfigurationException,
                           IOException

      Reads the content of this object from the specified `InputStream`.
      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 format
        `IOException` - if an I/O error occurs

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