简体   繁体   中英

early flushing in java

In java, how can I flush content early to the browser? I think GZipOutputStream is buffering the content.

Are there any alternatives to GZIPOutputStream to gzip . That alternative should be able to flush content early to the browser.

To flush content to a stream you can use flush(). Streams that don't do any buffering don't need to be flush()ed.

Do you know that your browser will do anything with files which have not been sent in full?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM