to top
Android APIs
public static class

CacheManager.CacheResult

extends Object
java.lang.Object
   ↳ android.webkit.CacheManager.CacheResult

This class is deprecated.
Access to the HTTP cache will be removed in a future release.

Class Overview

Represents a resource stored in the HTTP cache. Instances of this class can be obtained by calling CacheManager.getCacheFile(String, Map)).

Summary

Public Constructors
CacheManager.CacheResult()
Public Methods
String getContentDisposition()
Gets the value of the HTTP 'Content-Disposition' header with which this cache entry was received.
long getContentLength()
Gets the content length of this cache entry.
String getETag()
Gets the entity tag of this cache entry.
String getEncoding()
Gets the encoding of this cache entry.
long getExpires()
Gets the expiry date of this cache entry, expressed in milliseconds since midnight, January 1, 1970 UTC.
String getExpiresString()
Gets the expiry date of this cache entry, expressed as a string.
int getHttpStatusCode()
Gets the status code of this cache entry.
InputStream getInputStream()
Gets the input stream to the content of this cache entry, to allow content to be read.
String getLastModified()
Gets the date at which this cache entry was last modified, expressed as a string.
String getLocalPath()
Gets the path of the file used to store the content of this cache entry, relative to the base directory of the cache.
String getLocation()
Gets the value of the HTTP 'Location' header with which this cache entry was received.
String getMimeType()
Gets the MIME type of this cache entry.
OutputStream getOutputStream()
Gets an output stream to the content of this cache entry, to allow content to be written.
void setEncoding(String encoding)
Sets the encoding of this cache entry.
void setInputStream(InputStream stream)
Sets an input stream to the content of this cache entry.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CacheManager.CacheResult ()

Since: API Level 1

Public Methods

public String getContentDisposition ()

Since: API Level 7

Gets the value of the HTTP 'Content-Disposition' header with which this cache entry was received.

Returns
  • the HTTP 'Content-Disposition' header for this cache entry

public long getContentLength ()

Since: API Level 1

Gets the content length of this cache entry.

Returns
  • the content length of this cache entry

public String getETag ()

Since: API Level 1

Gets the entity tag of this cache entry.

Returns
  • the entity tag of this cache entry

public String getEncoding ()

Since: API Level 1

Gets the encoding of this cache entry.

Returns
  • the encoding of this cache entry

public long getExpires ()

Since: API Level 1

Gets the expiry date of this cache entry, expressed in milliseconds since midnight, January 1, 1970 UTC.

Returns
  • the expiry date of this cache entry

public String getExpiresString ()

Since: API Level 7

Gets the expiry date of this cache entry, expressed as a string.

Returns
  • the expiry date of this cache entry

public int getHttpStatusCode ()

Since: API Level 1

Gets the status code of this cache entry.

Returns
  • the status code of this cache entry

public InputStream getInputStream ()

Since: API Level 1

Gets the input stream to the content of this cache entry, to allow content to be read. See CacheManager.getCacheFile(String, Map).

Returns
  • an input stream to the content of this cache entry

public String getLastModified ()

Since: API Level 1

Gets the date at which this cache entry was last modified, expressed as a string.

Returns
  • the date at which this cache entry was last modified

public String getLocalPath ()

Since: API Level 1

Gets the path of the file used to store the content of this cache entry, relative to the base directory of the cache. See CacheManager.getCacheFileBaseDir().

Returns
  • the path of the file used to store this cache entry

public String getLocation ()

Since: API Level 1

Gets the value of the HTTP 'Location' header with which this cache entry was received.

Returns
  • the HTTP 'Location' header for this cache entry

public String getMimeType ()

Since: API Level 1

Gets the MIME type of this cache entry.

Returns
  • the MIME type of this cache entry

public OutputStream getOutputStream ()

Since: API Level 1

Gets an output stream to the content of this cache entry, to allow content to be written. See CacheManager.saveCacheFile(String, CacheResult).

Returns
  • an output stream to the content of this cache entry

public void setEncoding (String encoding)

Since: API Level 1

Sets the encoding of this cache entry.

Parameters
encoding the encoding of this cache entry

public void setInputStream (InputStream stream)

Since: API Level 1

Sets an input stream to the content of this cache entry.

Parameters
stream an input stream to the content of this cache entry