Package org.luwrain.util
Class FileUtils
java.lang.Object
org.luwrain.util.FileUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createSubdirs
(File destDir) static File
ifNotAbsolute
(File baseDir, String path) static String
readTextFileAsString
(File file) static String
readTextFileAsString
(File file, String charset) static String[]
readTextFileMultipleStrings
(File file, String charset, String lineSeparator) static String
readTextFileSingleString
(File file) static String
readTextFileSingleString
(File file, String charset) static String[]
universalLineSplitting
(String text) static void
writeTextFileMultipleStrings
(File file, String[] text, String charset, String lineSeparator) static void
writeTextFileSingleString
(File file, String text, String charset)
-
Field Details
-
UTF_8
- See Also:
-
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
readTextFileAsString
- Throws:
IOException
-
readTextFileAsString
- Throws:
IOException
-
readTextFileSingleString
- Throws:
IOException
-
readTextFileSingleString
- Throws:
IOException
-
writeTextFileSingleString
public static void writeTextFileSingleString(File file, String text, String charset) throws IOException - Throws:
IOException
-
readTextFileMultipleStrings
public static String[] readTextFileMultipleStrings(File file, String charset, String lineSeparator) throws IOException - Throws:
IOException
-
writeTextFileMultipleStrings
public static void writeTextFileMultipleStrings(File file, String[] text, String charset, String lineSeparator) throws IOException - Throws:
IOException
-
universalLineSplitting
-
ifNotAbsolute
-
createSubdirs
- Throws:
IOException
-