Class Ios


  • public final class Ios
    extends Object
    Common static IO Utilities.
    • Method Detail

      • read

        public static String read​(Reader reader)
        Read input reader: extract content and return it as a String.
        Parameters:
        reader - Reader input.
        Returns:
        String content.
        Throws:
        MustacheIOException - If an IO exception occurs during reading operation.
      • getStream

        public static InputStream getStream​(String name)
        Return an input stream from given name. Name is searched into the classpath. Name can contains ant style pattern.
        Parameters:
        name - Name.
        Returns:
        Input Stream.
      • getFirstAvailableStream

        public static InputStream getFirstAvailableStream​(Collection<String> names)
        Return an input stream from given names. First result returning a valid stream is returned. Names are searched into the classpath. Names can contains ant style pattern.
        Parameters:
        names - Names collection.
        Returns:
        Input Stream.
        Throws:
        MustacheIOException - If everything fail.