title: calling flush() on Jersey StreamingOutput has no effect
body: <p>I am using a Jersey <code>StreamingOutput</code> that was working just fine until we upgraded to Jersey 2.16.  Here's the thing.  My <code>StreamingOuput</code> produces output very slowly in some circumstances.  I do write data regularly, but I write it pretty slowly and just a little of it at a time.  I call <code>flush()</code> on the <code>OutputStream</code> passed to <code>StreamingOutput.write()</code> every time I write any bytes, but the flush() appears to have no effect.  Nothing is sent over the wire until 8K has been written to the <code>OutputStream</code>.  Unfortunately, in some circumstances, by the time 8K has been written, the client has timed out.</p>
  
  <p>I downloaded some of the jersey source and through some debugging, I see that the <code>OutputStream</code> passed to <code>write()</code> is an <code>UnCloseableOutputStream</code> which wraps a <code>CommittingOutputStream</code>.</p>
  
  <p>The <code>CommittingOutputStream</code> has buffering enabled, and therefore the flush() is essentially a no-op until the response is committed (complete).  </p>
  
  <p>So, I am in a pickle.  How can I use a <code>StreamingOutput</code> (or otherwise write directly to an output stream) and force it to send bytes over the wire before the entire response is complete?  Is there some other way to do this with Jersey?  I can't find any methods on the <code>ResponseBuilder</code> to do this.  I can't find any way to turn off buffering.</p>