List of utility methods to do GZip File Create
File | newGzipFile(String content, String name) Creates a temporary GzipFile withe the content at content . File tempFile = File.createTempFile(name, ".gz"); try (FileOutputStream output = new FileOutputStream(tempFile)) { try (Writer writer = new OutputStreamWriter(new GZIPOutputStream(output), "UTF-8")) { writer.write(content); return tempFile; |