Class FormatInputStream
- java.lang.Object
-
- com.yahoo.vespa.http.client.runner.FormatInputStream
-
public class FormatInputStream extends java.lang.Object
- Author:
- valerijf
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FormatInputStream.Format
-
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatInputStream.Format
getFormat()
java.io.InputStream
getInputStream()
-
-
-
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 presentinputFile
- path to file to use as inputaddRootElementToXml
- to add vespafeed root element around the input data stream- Throws:
java.io.IOException
- on errors
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream()
-
getFormat
public FormatInputStream.Format getFormat()
-
-