Uncomppresed GZIP FILE WRITTEN BY WRITER

Viewed 31

I have this code that compresses a string and write to a streamwritter

FileOutputStream output = new FileOutputStream(outPutFilePath.toFile());
try {
    Writer writer = new OutputStreamWriter(new GZIPOutputStream(output), "UTF-8");
    try {
        writer.write(String.valueOf(stringByteArray));
    } finally {
        writer.close();
    }
} finally {
    output.close();
}

How can I convert back my string?

0 Answers
Related