Skip to content

Commit ff35000

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Fix JavaDoc style for several WebView classes" into jb-dev
2 parents 2996cf0 + 4e584df commit ff35000

File tree

7 files changed

+828
-600
lines changed

7 files changed

+828
-600
lines changed

core/java/android/webkit/CacheManager.java

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public final class CacheManager {
5656
* Represents a resource stored in the HTTP cache. Instances of this class
5757
* can be obtained by calling
5858
* {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>))}.
59+
*
5960
* @deprecated Access to the HTTP cache will be removed in a future release.
6061
*/
6162
@Deprecated
@@ -81,15 +82,17 @@ public static class CacheResult {
8182

8283
/**
8384
* Gets the status code of this cache entry.
84-
* @return The status code of this cache entry
85+
*
86+
* @return the status code of this cache entry
8587
*/
8688
public int getHttpStatusCode() {
8789
return httpStatusCode;
8890
}
8991

9092
/**
9193
* Gets the content length of this cache entry.
92-
* @return The content length of this cache entry
94+
*
95+
* @return the content length of this cache entry
9396
*/
9497
public long getContentLength() {
9598
return contentLength;
@@ -99,7 +102,8 @@ public long getContentLength() {
99102
* Gets the path of the file used to store the content of this cache
100103
* entry, relative to the base directory of the cache. See
101104
* {@link CacheManager#getCacheFileBaseDir CacheManager.getCacheFileBaseDir()}.
102-
* @return The path of the file used to store this cache entry
105+
*
106+
* @return the path of the file used to store this cache entry
103107
*/
104108
public String getLocalPath() {
105109
return localPath;
@@ -108,15 +112,17 @@ public String getLocalPath() {
108112
/**
109113
* Gets the expiry date of this cache entry, expressed in milliseconds
110114
* since midnight, January 1, 1970 UTC.
111-
* @return The expiry date of this cache entry
115+
*
116+
* @return the expiry date of this cache entry
112117
*/
113118
public long getExpires() {
114119
return expires;
115120
}
116121

117122
/**
118123
* Gets the expiry date of this cache entry, expressed as a string.
119-
* @return The expiry date of this cache entry
124+
*
125+
* @return the expiry date of this cache entry
120126
*
121127
*/
122128
public String getExpiresString() {
@@ -126,23 +132,26 @@ public String getExpiresString() {
126132
/**
127133
* Gets the date at which this cache entry was last modified, expressed
128134
* as a string.
129-
* @return The date at which this cache entry was last modified
135+
*
136+
* @return the date at which this cache entry was last modified
130137
*/
131138
public String getLastModified() {
132139
return lastModified;
133140
}
134141

135142
/**
136143
* Gets the entity tag of this cache entry.
137-
* @return The entity tag of this cache entry
144+
*
145+
* @return the entity tag of this cache entry
138146
*/
139147
public String getETag() {
140148
return etag;
141149
}
142150

143151
/**
144152
* Gets the MIME type of this cache entry.
145-
* @return The MIME type of this cache entry
153+
*
154+
* @return the MIME type of this cache entry
146155
*/
147156
public String getMimeType() {
148157
return mimeType;
@@ -151,15 +160,17 @@ public String getMimeType() {
151160
/**
152161
* Gets the value of the HTTP 'Location' header with which this cache
153162
* entry was received.
154-
* @return The HTTP 'Location' header for this cache entry
163+
*
164+
* @return the HTTP 'Location' header for this cache entry
155165
*/
156166
public String getLocation() {
157167
return location;
158168
}
159169

160170
/**
161171
* Gets the encoding of this cache entry.
162-
* @return The encoding of this cache entry
172+
*
173+
* @return the encoding of this cache entry
163174
*/
164175
public String getEncoding() {
165176
return encoding;
@@ -168,7 +179,8 @@ public String getEncoding() {
168179
/**
169180
* Gets the value of the HTTP 'Content-Disposition' header with which
170181
* this cache entry was received.
171-
* @return The HTTP 'Content-Disposition' header for this cache entry
182+
*
183+
* @return the HTTP 'Content-Disposition' header for this cache entry
172184
*
173185
*/
174186
public String getContentDisposition() {
@@ -179,7 +191,8 @@ public String getContentDisposition() {
179191
* Gets the input stream to the content of this cache entry, to allow
180192
* content to be read. See
181193
* {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>)}.
182-
* @return An input stream to the content of this cache entry
194+
*
195+
* @return an input stream to the content of this cache entry
183196
*/
184197
public InputStream getInputStream() {
185198
return inStream;
@@ -189,7 +202,8 @@ public InputStream getInputStream() {
189202
* Gets an output stream to the content of this cache entry, to allow
190203
* content to be written. See
191204
* {@link CacheManager#saveCacheFile CacheManager.saveCacheFile(String, CacheResult)}.
192-
* @return An output stream to the content of this cache entry
205+
*
206+
* @return an output stream to the content of this cache entry
193207
*/
194208
// Note that this is always null for objects returned by getCacheFile()!
195209
public OutputStream getOutputStream() {
@@ -199,15 +213,17 @@ public OutputStream getOutputStream() {
199213

200214
/**
201215
* Sets an input stream to the content of this cache entry.
202-
* @param stream An input stream to the content of this cache entry
216+
*
217+
* @param stream an input stream to the content of this cache entry
203218
*/
204219
public void setInputStream(InputStream stream) {
205220
this.inStream = stream;
206221
}
207222

208223
/**
209224
* Sets the encoding of this cache entry.
210-
* @param encoding The encoding of this cache entry
225+
*
226+
* @param encoding the encoding of this cache entry
211227
*/
212228
public void setEncoding(String encoding) {
213229
this.encoding = encoding;
@@ -225,7 +241,8 @@ public void setContentLength(long contentLength) {
225241
* Initializes the HTTP cache. This method must be called before any
226242
* CacheManager methods are used. Note that this is called automatically
227243
* when a {@link WebView} is created.
228-
* @param context The application context
244+
*
245+
* @param context the application context
229246
*/
230247
static void init(Context context) {
231248
// This isn't actually where the real cache lives, but where we put files for the
@@ -240,7 +257,8 @@ static void init(Context context) {
240257
* Gets the base directory in which the files used to store the contents of
241258
* cache entries are placed. See
242259
* {@link CacheManager.CacheResult#getLocalPath CacheManager.CacheResult.getLocalPath()}.
243-
* @return The base directory of the cache
260+
*
261+
* @return the base directory of the cache
244262
* @deprecated Access to the HTTP cache will be removed in a future release.
245263
*/
246264
@Deprecated
@@ -250,7 +268,8 @@ public static File getCacheFileBaseDir() {
250268

251269
/**
252270
* Gets whether the HTTP cache is disabled.
253-
* @return True if the HTTP cache is disabled
271+
*
272+
* @return true if the HTTP cache is disabled
254273
* @deprecated Access to the HTTP cache will be removed in a future release.
255274
*/
256275
@Deprecated
@@ -262,8 +281,9 @@ public static boolean cacheDisabled() {
262281
* Starts a cache transaction. Returns true if this is the only running
263282
* transaction. Otherwise, this transaction is nested inside currently
264283
* running transactions and false is returned.
265-
* @return True if this is the only running transaction
266-
* @deprecated This method no longer has any effect and always returns false
284+
*
285+
* @return true if this is the only running transaction
286+
* @deprecated This method no longer has any effect and always returns false.
267287
*/
268288
@Deprecated
269289
public static boolean startCacheTransaction() {
@@ -273,8 +293,9 @@ public static boolean startCacheTransaction() {
273293
/**
274294
* Ends the innermost cache transaction and returns whether this was the
275295
* only running transaction.
276-
* @return True if this was the only running transaction
277-
* @deprecated This method no longer has any effect and always returns false
296+
*
297+
* @return true if this was the only running transaction
298+
* @deprecated This method no longer has any effect and always returns false.
278299
*/
279300
@Deprecated
280301
public static boolean endCacheTransaction() {
@@ -287,10 +308,11 @@ public static boolean endCacheTransaction() {
287308
* entry needs validation, appropriate headers will be added to the map.
288309
* The input stream of the CacheEntry object should be closed by the caller
289310
* when access to the underlying file is no longer required.
290-
* @param url The URL for which a cache entry is requested
291-
* @param headers A map from HTTP header name to value, to be populated
311+
*
312+
* @param url the URL for which a cache entry is requested
313+
* @param headers a map from HTTP header name to value, to be populated
292314
* for the returned cache entry
293-
* @return The cache entry for the specified URL
315+
* @return the cache entry for the specified URL
294316
* @deprecated Access to the HTTP cache will be removed in a future release.
295317
*/
296318
@Deprecated
@@ -345,14 +367,15 @@ static CacheResult getCacheFile(String url, long postIdentifier,
345367
}
346368

347369
/**
348-
* Given a url and its full headers, returns CacheResult if a local cache
370+
* Given a URL and its full headers, gets a CacheResult if a local cache
349371
* can be stored. Otherwise returns null. The mimetype is passed in so that
350372
* the function can use the mimetype that will be passed to WebCore which
351373
* could be different from the mimetype defined in the headers.
352374
* forceCache is for out-of-package callers to force creation of a
353375
* CacheResult, and is used to supply surrogate responses for URL
354376
* interception.
355-
* @return CacheResult for a given url
377+
*
378+
* @return a CacheResult for a given URL
356379
*/
357380
static CacheResult createCacheFile(String url, int statusCode,
358381
Headers headers, String mimeType, boolean forceCache) {
@@ -363,8 +386,9 @@ static CacheResult createCacheFile(String url, int statusCode,
363386
/**
364387
* Adds a cache entry to the HTTP cache for the specicifed URL. Also closes
365388
* the cache entry's output stream.
366-
* @param url The URL for which the cache entry should be added
367-
* @param cacheResult The cache entry to add
389+
*
390+
* @param url the URL for which the cache entry should be added
391+
* @param cacheResult the cache entry to add
368392
* @deprecated Access to the HTTP cache will be removed in a future release.
369393
*/
370394
@Deprecated
@@ -401,9 +425,9 @@ static void saveCacheFile(String url, long postIdentifier,
401425
}
402426

403427
/**
404-
* Remove all cache files.
428+
* Removes all cache files.
405429
*
406-
* @return Whether the removal succeeded.
430+
* @return whether the removal succeeded
407431
*/
408432
static boolean removeAllCacheFiles() {
409433
// delete cache files in a separate thread to not block UI.

0 commit comments

Comments
 (0)