(String path, boolean append)
| 57 | } |
| 58 | |
| 59 | public static Writer getTextFileWriter(String path, boolean append) throws FileNotFoundException, IOException { |
| 60 | if (path.toLowerCase().endsWith(GZIP_EXT)) { |
| 61 | return new OutputStreamWriter( |
| 62 | new FastGZIPOutputStream( |
| 63 | new FileOutputStream(path, append), |
| 64 | BUFFER_SIZE), |
| 65 | StandardCharsets.UTF_8); |
| 66 | } |
| 67 | else { |
| 68 | return new BufferedWriter(new FileWriter(path, append), BUFFER_SIZE); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | public static void touch(File f) throws IOException { |
| 73 | f.getParentFile().mkdirs(); |
no outgoing calls
no test coverage detected