Has anyone seen a package that will allow me to do stuff like:
MyFile f = new MyFile ("zipFile.zip\\zippedFileName.ext");
MyFile g = new MyFile("normalFileName.ext");
I have a bunch of working, tested code that works with files and paths and I would like to add zip file handling with the minimum of fuss.
I can see and understand the zip file interface in java.util.zip and it will access zip files and create streams to the zipped contents but this would impact the clarity of the code significantly if I have to detect that I am working with a zip file in many places in the code.
I realise that if I work solely with streams and pass those around everywhere I'll get just about the same effect but each process needs to handle the file in a different way (check length, count records, parse data etc) so a stream is not so useful.
Besides, it would be quite a tidy solution if I could do most I/O using a file path in the above form.