- chunkLength
- the length to use, or 0 for the default chunk length.
Type Reason Java.Lang.IllegalStateException if already connected or another mode already set.
Stream a request body whose length is not known in advance. Old HTTP/1.0 only servers may not support this mode.
When HTTP chunked encoding is used, the stream is divided into chunks, each prefixed with a header containing the chunk's size. A large chunk length requires a large internal buffer, potentially wasting memory. A small chunk length increases the number of bytes that must be transmitted because of the header on every chunk.
Implementation details: In some releases the chunkLength is treated as a hint: chunks sent to the server may actually be larger or smaller. To force a chunk to be sent to the server call Java.IO.OutputStream.Flush.