Package org.drools.drlonyaml.cli.utils
Class Utils
- java.lang.Object
-
- org.drools.drlonyaml.cli.utils.Utils
-
public class Utils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.InputStreamconventionInputStream(java.io.File inputFile)Returns an InputStream reading the file content when provided as a parameter, otherwise from STDIN until `\\A` when null.static java.util.function.Consumer<java.lang.String>conventionOutputConsumer(java.io.File archive)Returns an Consumer which writes content to the file when provided as a parameter, otherwise consumer emits to STDOUT when null.
-
-
-
Method Detail
-
conventionInputStream
public static java.io.InputStream conventionInputStream(java.io.File inputFile) throws java.io.FileNotFoundExceptionReturns an InputStream reading the file content when provided as a parameter, otherwise from STDIN until `\\A` when null.- Throws:
java.io.FileNotFoundException
-
conventionOutputConsumer
public static java.util.function.Consumer<java.lang.String> conventionOutputConsumer(java.io.File archive)
Returns an Consumer which writes content to the file when provided as a parameter, otherwise consumer emits to STDOUT when null.
-
-