Class FormatInputStream


  • public class FormatInputStream
    extends Object
    Author:
    valerijf
    • Constructor Detail

      • FormatInputStream

        public FormatInputStream​(InputStream stream,
                                 Optional<String> inputFile,
                                 boolean addRootElementToXml)
                          throws 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:
        IOException - on errors