Class FormatInputStream


  • public class FormatInputStream
    extends java.lang.Object
    Author:
    valerijf
    • Constructor Summary

      Constructors 
      Constructor Description
      FormatInputStream​(java.io.InputStream stream, java.util.Optional<java.lang.String> inputFile, boolean addRootElementToXml)
      Creates a single data input stream from either file or InputStream depending on which one is present.
    • Constructor Detail

      • FormatInputStream

        public FormatInputStream​(java.io.InputStream stream,
                                 java.util.Optional<java.lang.String> inputFile,
                                 boolean addRootElementToXml)
                          throws java.io.IOException
        Creates a single data input stream from either file or InputStream depending on which one is present. Preference for file if both present. Additionally also detects input data format of the result stream, throws IllegalArgumentException if unable to determine data format.
        Parameters:
        stream - InputStream of the data if present
        inputFile - path to file to use as input
        addRootElementToXml - to add vespafeed root element around the input data stream
        Throws:
        java.io.IOException - on errors