Files handling, file->zip->process
Hello,
I am trying to make a simple coding programme. I have the encoding working, but I want first to zip the file I want to encode, do the encoding and then save it on the disk.
So the question is, how do I connect the GZIPOutputStream or some other with FileInputStream? I want to avoid running many loops and processing the data byte-after-byte. And how do I read the zipped data then?
[409 byte] By [
kubeeka] at [2007-11-27 5:32:09]

>
> So the question is, how do I connect the
> GZIPOutputStream or some other with FileInputStream?
> I want to avoid running many loops and processing the
> data byte-after-byte.
You can use Buffers.
Take a look at http://java.sun.com/developer/technicalArticles/Programming/compression/
That's an article with code samples and honestly the code is all you will ever need for reading and writing ZipStreams in Java.