Class FileUtils

java.lang.Object
org.parboiled.common.FileUtils

public final class FileUtils extends Object
  • Method Details

    • 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(String filename, Charset charset)
    • readAllText

      public static String readAllText(File file)
    • readAllText

      public static String readAllText(File file, Charset charset)
    • readAllText

      public static String readAllText(InputStream stream)
    • readAllText

      public static String readAllText(InputStream stream, Charset charset)
    • 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)
    • writeAllText

      public static void writeAllText(String text, OutputStream stream)
    • writeAllText

      public static void writeAllText(String text, OutputStream stream, 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)
    • copyAll

      public static void copyAll(InputStream in, OutputStream out)
    • ensureParentDir

      public static void ensureParentDir(String filename)
    • ensureParentDir

      public static void ensureParentDir(File file)
    • forceMkdir

      public static void forceMkdir(File directory) throws IOException
      Throws:
      IOException