ning / compress

High-performance, streaming/chunking Java LZF codec, compatible with standard C LZF package
Other
254 stars 40 forks source link

Close() not working correctly with input, output streams #11

Closed cowtowncoder closed 12 years ago

cowtowncoder commented 12 years ago

As Dain S pointed out, currently Input-/OutputStream deal with close() in a way that is both incompatible with default JDK behavior, and potentially wrong wrt buffer recycling. The thing is that JDK actually expects an IOException to be thrown, when read/write is done on closed stream; and although there may deviations (I think System.out/err do not do this for example; nor StringWriter), I think we should throw an exception (and at most allow exception throwing be disabled as and option).

cowtowncoder commented 12 years ago

Fixed in 0.8.6 (just released)