Class FileUtils


  • public final class FileUtils
    extends Object
    • Method Detail

      • readAllTextFromResource

        public static String readAllTextFromResource​(String resource)
      • readAllTextFromResource

        public static String readAllTextFromResource​(String resource,
                                                     Charset charset)
      • readAllText

        public static String readAllText​(String filename)
      • readAllText

        public static String readAllText​(File file)
      • readAllCharsFromResource

        public static char[] readAllCharsFromResource​(String resource)
      • readAllCharsFromResource

        public static char[] readAllCharsFromResource​(String resource,
                                                      Charset charset)
      • readAllChars

        public static char[] readAllChars​(String filename)
      • readAllChars

        public static char[] readAllChars​(String filename,
                                          Charset charset)
      • readAllChars

        public static char[] readAllChars​(File file)
      • readAllChars

        public static char[] readAllChars​(File file,
                                          Charset charset)
      • readAllChars

        public static char[] readAllChars​(InputStream stream)
      • readAllChars

        public static char[] readAllChars​(InputStream stream,
                                          Charset charset)
      • readAllBytesFromResource

        public static byte[] readAllBytesFromResource​(String resource)
      • readAllBytes

        public static byte[] readAllBytes​(String filename)
      • readAllBytes

        public static byte[] readAllBytes​(File file)
      • readAllBytes

        public static byte[] readAllBytes​(InputStream stream)
      • writeAllText

        public static void writeAllText​(String text,
                                        String filename)
      • writeAllText

        public static void writeAllText​(String text,
                                        String filename,
                                        Charset charset)
      • writeAllText

        public static void writeAllText​(String text,
                                        File file)
      • writeAllText

        public static void writeAllText​(String text,
                                        File file,
                                        Charset charset)
      • writeAllChars

        public static void writeAllChars​(char[] chars,
                                         String filename)
      • writeAllChars

        public static void writeAllChars​(char[] chars,
                                         String filename,
                                         Charset charset)
      • writeAllChars

        public static void writeAllChars​(char[] chars,
                                         File file)
      • writeAllChars

        public static void writeAllChars​(char[] chars,
                                         File file,
                                         Charset charset)
      • writeAllChars

        public static void writeAllChars​(char[] chars,
                                         OutputStream stream)
      • writeAllChars

        public static void writeAllChars​(char[] chars,
                                         OutputStream stream,
                                         Charset charset)
      • writeAllBytes

        public static void writeAllBytes​(byte[] data,
                                         String filename)
      • writeAllBytes

        public static void writeAllBytes​(byte[] data,
                                         File file)
      • writeAllBytes

        public static void writeAllBytes​(byte[] data,
                                         OutputStream stream)
      • copyAll

        public static void copyAll​(Reader reader,
                                   Writer writer)
      • ensureParentDir

        public static void ensureParentDir​(String filename)
      • ensureParentDir

        public static void ensureParentDir​(File file)