diff options
| author | Torne (Richard Coles) <torne@google.com> | 2019-02-20 20:50:22 -0800 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2019-02-20 20:50:22 -0800 |
| commit | 5ed24cb220240a569f8b7e94afb092bc69218ee8 (patch) | |
| tree | 4a53eb60041ef1ea5a10d1aa4e025297b97adff6 /core/java/android/webkit/WebResourceResponse.java | |
| parent | 2969a3f40fce3aa61cf8cb7ed644bac4509fe5f3 (diff) | |
| parent | bec9d394d33e921e1c09675e88541989667fa446 (diff) | |
Merge "Clarify WebResourceResponse's stream handling." into pi-dev
am: bec9d394d3
Change-Id: Ic15302edd0598107cf8fb7a91924ec544592b435
Diffstat (limited to 'core/java/android/webkit/WebResourceResponse.java')
| -rw-r--r-- | core/java/android/webkit/WebResourceResponse.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/java/android/webkit/WebResourceResponse.java b/core/java/android/webkit/WebResourceResponse.java index e66596b5c0e9..7c8f33e181d6 100644 --- a/core/java/android/webkit/WebResourceResponse.java +++ b/core/java/android/webkit/WebResourceResponse.java @@ -42,9 +42,9 @@ public class WebResourceResponse { /** * Constructs a resource response with the given MIME type, character encoding, - * and input stream. Callers must implement - * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input - * stream. + * and input stream. Callers must implement {@link InputStream#read(byte[])} for + * the input stream. {@link InputStream#close()} will be called after the WebView + * has finished with the response. * * <p class="note"><b>Note:</b> The MIME type and character encoding must * be specified as separate parameters (for example {@code "text/html"} and @@ -67,9 +67,10 @@ public class WebResourceResponse { } /** - * Constructs a resource response with the given parameters. Callers must - * implement {@link InputStream#read(byte[]) InputStream.read(byte[])} for - * the input stream. + * Constructs a resource response with the given parameters. Callers must implement + * {@link InputStream#read(byte[])} for the input stream. {@link InputStream#close()} will be + * called after the WebView has finished with the response. + * * * <p class="note"><b>Note:</b> See {@link #WebResourceResponse(String,String,InputStream)} * for details on what should be specified for {@code mimeType} and {@code encoding}. @@ -201,7 +202,8 @@ public class WebResourceResponse { /** * Sets the input stream that provides the resource response's data. Callers - * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}. + * must implement {@link InputStream#read(byte[])}. {@link InputStream#close()} + * will be called after the WebView has finished with the response. * * @param data the input stream that provides the resource response's data. Must not be a * StringBufferInputStream. |
