The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
EVALUATION
PROBLEM CAUSE:
java.net.HttpURLConnection uses sun.net.www.httpChunkedOutputStream
which sends data in chunks which size is set with
java.net.HttpURLConnection.setChunkedStreamingMode(int size).
The problem with the current implementation is that the chunk headers are being
buffered in the lower 8k buffer and then if there is a write of larger than 8K
the lower buffer needs to be flushed first then write the chunk data, then the
footer will be buffered again in the lower 8k buffer, and subsequently flushed.
As a result java.io.BufferedOutputStream calls native SocketWrite() more then
once to send one data chunk. This has an impact on performance.
SOLUTION:
Buffering the whole chunk (header,data,footer) in ChunkedOutputStream would allow
to write the complete chunk in one go, if it is greater than 8K then it will by pass the lower buffer.
FIX DESCRIPTION:
The main idea is that write() method collects data in a buffer.
When a size of collected (stored) data reaches preferredChunkSize the data (as
a complete one chunk) get flushed to an underlying stream in one go.
So internal buffer of ChunkedOutputStrem never needs to be re-allaocated to
store more then a one data chunk and that's why CR 6526165 and CR 6631048
problem doesn't exist in this version of ChunkedOutputStream.