mirror of
https://github.com/corda/corda.git
synced 2025-01-09 14:33:30 +00:00
f0f35a920f
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. |
||
---|---|---|
.. | ||
DataFormatException.java | ||
Deflater.java | ||
DeflaterOutputStream.java | ||
Inflater.java | ||
InflaterInputStream.java | ||
ZipEntry.java | ||
ZipFile.java |