Is there a way to invoke the gunzip command in a Java class? What I need to do is to read a file that has a ".Z" suffix in memory, looking for a specific
string. When I find the string in the compressed file, I want to write out the 1000 lines that occurred prior to seeing the string in the file and write out the 1000 lines that follow the string. I want to write to a plain text file.
I know that I can do this in perl by invoking the gunzip command to create a temporary uncompressed file. Then I can read thru it looking for the string. And I can delete the temp file when I am finished.
But I'd rather do this in Java so that I can practice my Java skills.