summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/WebResourceResponse.java
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-02-21 02:10:10 +0000
committerSteve Block <steveblock@google.com>2012-02-21 10:21:37 +0000
commit938d2fbc57f05cc9bab9b551d7a454644208ee07 (patch)
treec8d11a957885432c84eeeceb64652976486866b5 /core/java/android/webkit/WebResourceResponse.java
parent77db9990777efd100bee4ec47568414ea039e99b (diff)
downloadframeworks_base-938d2fbc57f05cc9bab9b551d7a454644208ee07.zip
frameworks_base-938d2fbc57f05cc9bab9b551d7a454644208ee07.tar.gz
frameworks_base-938d2fbc57f05cc9bab9b551d7a454644208ee07.tar.bz2
Clean up JavaDoc for WebResourceResponse
Clean-up only, no functional change. Bug: 5461416 Change-Id: Iec37d5f67674b0fb9b5521c179773b7d09a3985c
Diffstat (limited to 'core/java/android/webkit/WebResourceResponse.java')
-rw-r--r--core/java/android/webkit/WebResourceResponse.java43
1 files changed, 24 insertions, 19 deletions
diff --git a/core/java/android/webkit/WebResourceResponse.java b/core/java/android/webkit/WebResourceResponse.java
index e786838..24e0d11 100644
--- a/core/java/android/webkit/WebResourceResponse.java
+++ b/core/java/android/webkit/WebResourceResponse.java
@@ -21,9 +21,9 @@ import android.net.http.Headers;
import java.io.InputStream;
/**
- * A WebResourceResponse is return by
- * {@link WebViewClient#shouldInterceptRequest} and
- * contains the response information for a particular resource.
+ * Encapsulates a resource response. Applications can return an instance of this
+ * class from {@link WebViewClient#shouldInterceptRequest} to provide a custom
+ * response when the WebView requests a particular resource.
*/
public class WebResourceResponse {
@@ -50,11 +50,13 @@ public class WebResourceResponse {
private InputStream mInputStream;
/**
- * Construct a response with the given mime type, encoding, and data.
- * @param mimeType The mime type of the data (i.e. text/html).
- * @param encoding The encoding of the bytes read from data.
- * @param data An InputStream for reading custom data. The implementation
- * must implement {@link InputStream#read(byte[])}.
+ * Constructs a resource response with the given MIME type, encoding, and
+ * input stream. Callers must implement
+ * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input
+ * stream.
+ * @param mimeType The resource response's MIME type, for example text/html
+ * @param encoding The resource response's encoding
+ * @param data The input stream that provides the resource response's data
*/
public WebResourceResponse(String mimeType, String encoding,
InputStream data) {
@@ -64,47 +66,50 @@ public class WebResourceResponse {
}
/**
- * Set the mime type of the response data (i.e. text/html).
- * @param mimeType
+ * Sets the resource response's MIME type, for example text/html.
+ * @param mimeType The resource response's MIME type
*/
public void setMimeType(String mimeType) {
mMimeType = mimeType;
}
/**
- * @see #setMimeType
+ * Gets the resource response's MIME type.
+ * @return The resource response's MIME type
*/
public String getMimeType() {
return mMimeType;
}
/**
- * Set the encoding of the response data (i.e. utf-8). This will be used to
- * decode the raw bytes from the input stream.
- * @param encoding
+ * Sets the resource response's encoding, for example UTF-8. This is used
+ * to decode the data from the input stream.
+ * @param encoding The resource response's encoding
*/
public void setEncoding(String encoding) {
mEncoding = encoding;
}
/**
- * @see #setEncoding
+ * Gets the resource response's encoding.
+ * @return The resource response's encoding
*/
public String getEncoding() {
return mEncoding;
}
/**
- * Set the input stream containing the data for this resource.
- * @param data An InputStream for reading custom data. The implementation
- * must implement {@link InputStream#read(byte[])}.
+ * Sets the input stream that provides the resource respone's data. Callers
+ * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}.
+ * @param data The input stream that provides the resource response's data
*/
public void setData(InputStream data) {
mInputStream = data;
}
/**
- * @see #setData
+ * Gets the input stream that provides the resource respone's data.
+ * @return The input stream that provides the resource response's data
*/
public InputStream getData() {
return mInputStream;