Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4077821
Votes 11
Synopsis DeflaterOutputStream does not implement flush method
Category java:classes_util
Reported Against 1.1.3 , 1.1beta3
Release Fixed
State 11-Closed, Not Reproducible, bug
Priority: 4-Low
Related Bugs 4032746
Submit Date 09-SEP-1997
Description
The class java.util.zip.DeflaterOutputStream subclasses OutputStream, but does not implement the flush method of OutputStream.  The default implementation of flush does nothing; hence, DeflaterOutputStream takes no action when told to flush.  However, the interface to OutputStream.flush clearly states: "...forces any buffered bytes to be written out."  DeflaterOutputStream buffers bytes in its Deflater  customer , but does not flush them when told to.  It only flushes when it is closed.
Work Around
There is no workaround for this.  In JavaSafe, we actually link in zlib a second time to provide this functionality.
Evaluation
This requires support for partial flush in Deflater. Would be a nice thing
to have for FCS...

This has been fixed sometime ago. Now DeflaterOutputStream extends
FilterOutputStream, which flushes its underlying stream in 
FilterOutputStream.flush()


  xxxxx@xxxxx   2001-11-27
Comments
  
  Include a link with my name & email   

Submitted On 02-APR-1998
xorxor
Please implement the flush method, even if it means implementing a new
FlushableDeflater class.  ZLIB provides this ability, but you haven't exposed
it.  In my application, I'm deflating a stream while sending it over a socket,
and the client side inflates the stream and draws graphics progressively.  Due
to the large internal buffer in Deflater, my application sends data in large
chunks, and the client side spends too much time waiting for the next large
chunk to arrive.  I want to flush the Deflater to send smaller chunks, which
will improve the apparent responsiveness of the client side.  Note that
although DeflaterOutputStream lets you control the size of *its* buffer, it
doesn't let you control the size of Deflater's internal buffer.


Submitted On 28-OCT-1999
Zeljko
Is this bug related to 4206909?


Submitted On 15-MAY-2001
lapo.luchini
This is a dupe of 4206909 indeed, how to add this to 4206909 list of related bugs?
It's a pity to separate votes on two duped bugs...



PLEASE NOTE: JDK6 is formerly known as Project Mustang