java.lang.Object | |
↳ | android.webkit.WebStorage |
This class is used to manage the JavaScript storage APIs provided by the
WebView
. It manages the Application Cache API, the Web SQL Database
API and the HTML5 Web Storage API.
The Web SQL Database API provides storage which is private to a given
origin, where an origin comprises the host, scheme and port of a URI.
Similarly, use of the Application Cache API can be attributed to an origin.
This class provides access to the storage use and quotas for these APIs for
a given origin. Origins are represented using WebStorage.Origin
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WebStorage.Origin | This class encapsulates information about the amount of storage currently used by an origin for the JavaScript storage APIs. | ||||||||||
WebStorage.QuotaUpdater | Encapsulates a callback function which is used to provide a new quota for a JavaScript storage API. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears all storage currently being used by the JavaScript storage APIs.
| |||||||||||
Clears the storage currently being used by both the Application Cache and
Web SQL Database APIs by the given origin.
| |||||||||||
Gets the singleton instance of this class.
| |||||||||||
Gets the origins currently using either the Application Cache or Web SQL
Database APIs.
| |||||||||||
Gets the storage quota for the Web SQL Database API for the given origin.
| |||||||||||
Gets the amount of storage currently being used by both the Application
Cache and Web SQL Database APIs by the given origin.
| |||||||||||
Sets the storage quota for the Web SQL Database API for the given origin.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Clears all storage currently being used by the JavaScript storage APIs. This includes the Application Cache, Web SQL Database and the HTML5 Web Storage APIs.
Clears the storage currently being used by both the Application Cache and Web SQL Database APIs by the given origin. The origin is specified using its string representation.
Gets the singleton instance of this class.
WebStorage
instance
Gets the origins currently using either the Application Cache or Web SQL
Database APIs. This method operates asynchronously, with the result
being provided via a ValueCallback
. The origins are provided as
a map, of type Map
, from the string
representation of the origin to a WebStorage.Origin
object.
Gets the storage quota for the Web SQL Database API for the given origin.
The quota is given in bytes and the origin is specified using its string
representation. This method operates asynchronously, with the result
being provided via a ValueCallback
. Note that a quota is not
enforced on a per-origin basis for the Application Cache API.
Gets the amount of storage currently being used by both the Application
Cache and Web SQL Database APIs by the given origin. The amount is given
in bytes and the origin is specified using its string representation.
This method operates asynchronously, with the result being provided via
a ValueCallback
.
Sets the storage quota for the Web SQL Database API for the given origin. The quota is specified in bytes and the origin is specified using its string representation. Note that a quota is not enforced on a per-origin basis for the Application Cache API.