Class Utils


  • public class Utils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.InputStream conventionInputStream​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • conventionInputStream

        public static java.io.InputStream conventionInputStream​(java.io.File inputFile)
                                                         throws java.io.FileNotFoundException
        Returns 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.