summaryrefslogtreecommitdiffstats
path: root/luni/src/main
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-03-03 09:38:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-03-03 09:38:53 +0000
commit4189a6e183e8c38992df6de29321733fad06e50a (patch)
tree5495ad00eb8d7d1c5ff4f4e017cd6de7ca70c27a /luni/src/main
parenta7e33c3aeaf50c7b3a3ea77a10a1d5872026f1dd (diff)
parent60f79119fd7e37c459a96888594f90d86bab5535 (diff)
downloadlibcore-4189a6e183e8c38992df6de29321733fad06e50a.zip
libcore-4189a6e183e8c38992df6de29321733fad06e50a.tar.gz
libcore-4189a6e183e8c38992df6de29321733fad06e50a.tar.bz2
Merge "Tests and docs updates for OkHttp update."
Diffstat (limited to 'luni/src/main')
-rw-r--r--luni/src/main/java/java/net/HttpURLConnection.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/luni/src/main/java/java/net/HttpURLConnection.java b/luni/src/main/java/java/net/HttpURLConnection.java
index 89a4bc4..4e5b4ee 100644
--- a/luni/src/main/java/java/net/HttpURLConnection.java
+++ b/luni/src/main/java/java/net/HttpURLConnection.java
@@ -784,11 +784,15 @@ public abstract class HttpURLConnection extends URLConnection {
* only servers may not support this mode.
*
* <p>When HTTP chunked encoding is used, the stream is divided into
- * chunks, each prefixed with a header containing the chunk's size. Setting
- * a large chunk length requires a large internal buffer, potentially
- * wasting memory. Setting a small chunk length increases the number of
+ * 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.
- * Most caller should use {@code 0} to get the system default.
+ *
+ * <p>Implementation details: In some releases the {@code 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
+ * {@link java.io.OutputStream#flush()}.
*
* @see #setFixedLengthStreamingMode
* @param chunkLength the length to use, or {@code 0} for the default chunk