I am trying to learn about compression and have fallen at the first hurdle. The following code gzip's files:
... but I get the following errors:
Exception in thread "main" java.io.IOException: Bad file descriptor at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:177) at Compressor.gzipFile(Compressor.java:16) at Compressor.main(Compressor.java:28)
One site I visited said it was a bug in Java but the code wasn't quite the same. If anyone could point me in the right direction I'd be very grateful. Thank you.