Package io.axoniq.dataprotection.serialization.xml

## Class InputStreamToDom4jConverter

- java.lang.Object
- - io.axoniq.dataprotection.serialization.xml.InputStreamToDom4jConverter

- All Implemented Interfaces:
    `ContentTypeConverter<InputStream,​org.dom4j.Document>`

      public class InputStreamToDom4jConverter
      extends Object
      implements ContentTypeConverter<InputStream,​org.dom4j.Document>

  Converter that converts an input stream to a Dom4J document. It assumes that the input stream provides UTF-8 formatted XML.
  Since:
    2.0
  Author:
    Allard Buijze

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InputStreamToDom4jConverter()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.dom4j.Document` | `convert​(InputStream original)` | Converts the given object into another.
    `Class<InputStream>` | `expectedSourceType()` | The expected type of input data.
    `Class<org.dom4j.Document>` | `targetType()` | The returned type of IntermediateRepresentation

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InputStreamToDom4jConverter

          public InputStreamToDom4jConverter()

  - ### Method Detail

    - #### expectedSourceType

          public Class<InputStream> expectedSourceType()

      Description copied from interface: `ContentTypeConverter`
      The expected type of input data.
      Specified by:
        `expectedSourceType` in interface `ContentTypeConverter<InputStream,​org.dom4j.Document>`
      Returns:
        the expected data format in IntermediateRepresentation

    - #### targetType

          public Class<org.dom4j.Document> targetType()

      Description copied from interface: `ContentTypeConverter`
      The returned type of IntermediateRepresentation
      Specified by:
        `targetType` in interface `ContentTypeConverter<InputStream,​org.dom4j.Document>`
      Returns:
        the output data format in IntermediateRepresentation

    - #### convert

          public org.dom4j.Document convert​(InputStream original)

      Description copied from interface: `ContentTypeConverter`
      Converts the given object into another. Typically, these values are contained by a `SerializedObject` instance.
      Specified by:
        `convert` in interface `ContentTypeConverter<InputStream,​org.dom4j.Document>`
      Parameters:
        `original` - the value to convert
      Returns:
        the converted value