IT. Expert System.

Android Reference

WebStorage


android.webkit

Class WebStorage

  • Direct Known Subclasses:
    WebStorageClassic


    public class WebStorage
    extends Object
    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 Application Cache API provides a mechanism to create and maintain an application cache to power offline Web applications. Use of the Application Cache API can be attributed to an origin WebStorage.Origin, however it is not possible to set per-origin quotas. Note that there can be only one application cache per application. The Web SQL Database API provides storage which is private to a given origin. Similar to the Application Cache, use of the Web SQL Database can be attributed to an origin. It is also possible to set per-origin quotas.
    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class WebStorage.Origin
      This class encapsulates information about the amount of storage currently used by an origin for the JavaScript storage APIs.
      static interface WebStorage.QuotaUpdater
      Encapsulates a callback function which is used to provide a new quota for a JavaScript storage API.
    • Constructor Summary

      Constructors
      Constructor and Description
      WebStorage()
      This class should not be instantiated directly, applications must only use getInstance() to obtain the instance.
    • Constructor Detail

      • WebStorage

        public WebStorage()
        This class should not be instantiated directly, applications must only use getInstance() to obtain the instance. Note this constructor was erroneously public and published in SDK levels prior to 16, but applications using it would receive a non-functional instance of this class (there was no way to call createHandler() and createUIHandler(), so it would not work).
    • Method Detail

      • getOrigins

        public void getOrigins(ValueCallback<Map> callback)
        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<String, WebStorage.Origin>, from the string representation of the origin to a WebStorage.Origin object.
      • getUsageForOrigin

        public void getUsageForOrigin(String origin,
                             ValueCallback<Long> callback)
        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.
      • getQuotaForOrigin

        public void getQuotaForOrigin(String origin,
                             ValueCallback<Long> callback)
        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.
      • setQuotaForOrigin

        public void setQuotaForOrigin(String origin,
                             long quota)
        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.
      • deleteOrigin

        public void deleteOrigin(String origin)
        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.
      • deleteAllData

        public void deleteAllData()
        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.
      • getInstance

        public static WebStorage getInstance()
        Gets the singleton instance of this class.
        Returns:
        the singleton WebStorage instance


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 358 / 158869127. Delta: 0.03824 с