Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6526165

sun.net.www.http.ChunkedOutputStream buffers

XMLWordPrintable

    • b01
    • generic
    • generic
    • Not verified

        HttpURLConnection.getOutputStream() returns ChunkedOutputStream when setChunkedStreamingMode(4k) is called. But ChunkedOutputStream copies when write(byte[], off, len) is called. When ChunkedOutputStream.write(buf[20MB], off, len) is called, it keeps a copy of 20 MB. Thus, applications run of memory. There is no need to keep 20 MB in buf field since the chunk size 4k. This limits severly some of the JAX-WS applications and forces JAX-WS to do chunking before writing to ChunkedOutputStream. The fact that we are using chunking to avoid buffering doesn't help.

              miroslawzn Miroslaw Niemiec (Inactive)
              jkotamra Jitendra Kotamraju (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: