Package org.parboiled.common
Class FileUtils
java.lang.Object
org.parboiled.common.FileUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyAll
(InputStream in, OutputStream out) static void
static void
ensureParentDir
(File file) static void
ensureParentDir
(String filename) static void
forceMkdir
(File directory) static byte[]
readAllBytes
(File file) static byte[]
readAllBytes
(InputStream stream) static byte[]
readAllBytes
(String filename) static byte[]
readAllBytesFromResource
(String resource) static char[]
readAllChars
(File file) static char[]
readAllChars
(File file, Charset charset) static char[]
readAllChars
(InputStream stream) static char[]
readAllChars
(InputStream stream, Charset charset) static char[]
readAllChars
(String filename) static char[]
readAllChars
(String filename, Charset charset) static char[]
readAllCharsFromResource
(String resource) static char[]
readAllCharsFromResource
(String resource, Charset charset) static String
readAllText
(File file) static String
readAllText
(File file, Charset charset) static String
readAllText
(InputStream stream) static String
readAllText
(InputStream stream, Charset charset) static String
readAllText
(String filename) static String
readAllText
(String filename, Charset charset) static String
readAllTextFromResource
(String resource) static String
readAllTextFromResource
(String resource, Charset charset) static void
writeAllBytes
(byte[] data, File file) static void
writeAllBytes
(byte[] data, OutputStream stream) static void
writeAllBytes
(byte[] data, String filename) static void
writeAllChars
(char[] chars, File file) static void
writeAllChars
(char[] chars, File file, Charset charset) static void
writeAllChars
(char[] chars, OutputStream stream) static void
writeAllChars
(char[] chars, OutputStream stream, Charset charset) static void
writeAllChars
(char[] chars, String filename) static void
writeAllChars
(char[] chars, String filename, Charset charset) static void
writeAllText
(String text, File file) static void
writeAllText
(String text, File file, Charset charset) static void
writeAllText
(String text, OutputStream stream) static void
writeAllText
(String text, OutputStream stream, Charset charset) static void
writeAllText
(String text, String filename) static void
writeAllText
(String text, String filename, Charset charset)
-
Method Details
-
readAllTextFromResource
-
readAllTextFromResource
-
readAllText
-
readAllText
-
readAllText
-
readAllText
-
readAllText
-
readAllText
-
readAllCharsFromResource
-
readAllCharsFromResource
-
readAllChars
-
readAllChars
-
readAllChars
-
readAllChars
-
readAllChars
-
readAllChars
-
readAllBytesFromResource
-
readAllBytes
-
readAllBytes
-
readAllBytes
-
writeAllText
-
writeAllText
-
writeAllText
-
writeAllText
-
writeAllText
-
writeAllText
-
writeAllChars
-
writeAllChars
-
writeAllChars
-
writeAllChars
-
writeAllChars
-
writeAllChars
-
writeAllBytes
-
writeAllBytes
-
writeAllBytes
-
copyAll
-
copyAll
-
ensureParentDir
-
ensureParentDir
-
forceMkdir
- Throws:
IOException
-