Package org.apache.torque.generator.source.stream

## Interface StreamSourceFormat

- All Known Implementing Classes:
    `PropertiesSourceFormat`, `XmlSourceFormat`

      public interface StreamSourceFormat

  A format for a stream-based source, e.g. properties or XML. $Id: StreamSourceFormat.java 1839288 2018-08-27 09:48:33Z tv $

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getFilenameExtension()` | Gets the filename extension this source type typically has.
    `String` | `getKey()` | Returns an unique key for the source format.
    `SourceElement` | `parse​(InputStream inputStream, ControllerState controllerState)` | Parses a source file and returns its root element.

- - ### Method Detail

    - #### getKey

          String getKey()

      Returns an unique key for the source format.
      Returns:
        an unique key for the source format, not null.

    - #### getFilenameExtension

          String getFilenameExtension()

      Gets the filename extension this source type typically has.
      Returns:
        the filename extension without leading dot, or null if no typical extension exists.

    - #### parse

          SourceElement parse​(InputStream inputStream,
                              ControllerState controllerState)
                       throws SourceException

      Parses a source file and returns its root element.
      Parameters:
        `inputStream` - the stream to read the source file from, not null.
        `controllerState` - the controller state, not null.
      Returns:
        the root element of the source, containing the rest of the source as linked elements.
      Throws:
        `SourceException` - if reading or parsing the source fails.
        `NullPointerException` - if `inputStream` is null.