Methods Summary |
---|
public static boolean | cacheDisabled()Gets whether the HTTP cache is disabled.
return false;
|
public static boolean | endCacheTransaction()Ends the innermost cache transaction and returns whether this was the
only running transaction.
return false;
|
public static android.webkit.CacheManager$CacheResult | getCacheFile(java.lang.String url, java.util.Map headers)Gets the cache entry for the specified URL, or null if none is found.
If a non-null value is provided for the HTTP headers map, and the cache
entry needs validation, appropriate headers will be added to the map.
The input stream of the CacheEntry object should be closed by the caller
when access to the underlying file is no longer required.
return null;
|
public static java.io.File | getCacheFileBaseDir()Gets the base directory in which the files used to store the contents of
cache entries are placed. See
{@link CacheManager.CacheResult#getLocalPath CacheManager.CacheResult.getLocalPath()}.
return null;
|
public static void | saveCacheFile(java.lang.String url, android.webkit.CacheManager$CacheResult cacheResult)Adds a cache entry to the HTTP cache for the specicifed URL. Also closes
the cache entry's output stream.
saveCacheFile(url, 0, cacheResult);
|
static void | saveCacheFile(java.lang.String url, long postIdentifier, android.webkit.CacheManager$CacheResult cacheRet)
try {
cacheRet.outStream.close();
} catch (IOException e) {
return;
}
// This method is exposed in the public API but the API provides no
// way to obtain a new CacheResult object with a non-null output
// stream ...
// - CacheResult objects returned by getCacheFile() have a null
// output stream.
// - new CacheResult objects have a null output stream and no
// setter is provided.
// Since this method throws a null pointer exception in this case,
// it is effectively useless from the point of view of the public
// API.
//
// With the Chromium HTTP stack we continue to throw the same
// exception for 'backwards compatibility' with the Android HTTP
// stack.
//
// This method is not used from within this package, and for public API
// use, we should already have thrown an exception above.
assert false;
|
public static boolean | startCacheTransaction()Starts a cache transaction. Returns true if this is the only running
transaction. Otherwise, this transaction is nested inside currently
running transactions and false is returned.
return false;
|