corda/classpath/java
Joel Dice f0f35a920f return a useful value from InflaterInputStream.available
Note the following excerpt from PNGFileFormat.java in SWT:

     /*
     * InflaterInputStream does not consume all bytes in the stream
     * when it is closed. This may leave unread IDAT chunks. The fix
     * is to read all available bytes before closing it.
     */
     while (stream.available() > 0) stream.read();
     stream.close();

This code relies on the documented behavior of
InflaterInputStream.available, which must return "0 after EOF has been
reached, otherwise always return 1".  This is unlike
InputStream.available, which is documented to return "the number of
bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input
stream", and says nothing about how many bytes are left until the end
of stream.

This commit modifies InflaterInputStream.available to behave according
to Sun's documentation.
2010-08-04 18:54:47 -06:00
..
io return a useful value from InflaterInputStream.available 2010-08-04 18:54:47 -06:00
lang Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2010-06-15 18:27:51 -06:00
net switch from gethostbyname to getaddrinfo on POSIX systems 2010-06-14 16:09:56 -06:00
nio add java.nio.channels.Channels implementation 2010-07-13 18:03:25 -06:00
security add AccessControlException 2009-08-24 16:40:25 -06:00
text prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
util return a useful value from InflaterInputStream.available 2010-08-04 18:54:47 -06:00