(String path)
| 48 | public class FileUtils { |
| 49 | |
| 50 | public static BufferedReader getTextFileReader(String path) throws FileNotFoundException, IOException { |
| 51 | if (path.toLowerCase().endsWith(GZIP_EXT)) { |
| 52 | return new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(path), BUFFER_SIZE)), BUFFER_SIZE); |
| 53 | } |
| 54 | else { |
| 55 | return new BufferedReader(new InputStreamReader(new FileInputStream(path)), BUFFER_SIZE); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | public static Writer getTextFileWriter(String path, boolean append) throws FileNotFoundException, IOException { |
| 60 | if (path.toLowerCase().endsWith(GZIP_EXT)) { |
no outgoing calls
no test coverage detected