The said file extension is explained here at http://kb.iu.edu/data/abck.html. I want to use a java api to read the contents of a Z file. Neither the ZipFile api or the GZIPI
I've had success reading compressed files with UncompressInputStream.java. I haven't verified if the logic is correct, but it seems to work.
FileInputStream fis = new FileInputStream( new File( "thefile.cfg.Z" ) );
InputStream is = new UncompressInputStream( new BufferedInputStream( fis ) );
BufferedReader reader = new BufferedReader(new InputStreamReader( is ) );
String line = null;
while ( ( line = reader.readLine() ) != null )
{
System.out.println( "line = " + line );
}