Class IoUtil


  • public class IoUtil
    extends Object
    Author:
    Tom Baeyens, Frederik Heremans, Joram Barrez
    • Constructor Detail

      • IoUtil

        public IoUtil()
    • Method Detail

      • readInputStream

        public static byte[] readInputStream​(InputStream inputStream,
                                             String inputStreamName)
      • readClasspathResourceAsString

        public static String readClasspathResourceAsString​(String resourceName)
      • getFile

        public static File getFile​(String filePath)
      • writeStringToFile

        public static void writeStringToFile​(String content,
                                             String filePath)
      • closeSilently

        public static void closeSilently​(Closeable closeable)
        Closes the given stream. The same as calling Closeable.close(), but errors while closing are silently ignored.
      • flushSilently

        public static void flushSilently​(Flushable flushable)
        Flushes the given object. The same as calling Flushable.flush(), but errors while flushing are silently ignored.