Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
java.net

Interface CookieStore


  • public interface CookieStore
    A CookieStore object represents a storage for cookie. Can store and retrieve cookies.

    CookieManager will call CookieStore.add to save cookies for every incoming HTTP response, and call CookieStore.get to retrieve cookie for every outgoing HTTP request. A CookieStore is responsible for removing HttpCookie instances which have expired.

    Since:
    1.6
    • Method Detail

      • add

        void add(URI uri,
               HttpCookie cookie)
        Adds one HTTP cookie to the store. This is called for every incoming HTTP response.

        A cookie to store may or may not be associated with an URI. If it is not associated with an URI, the cookie's domain and path attribute will indicate where it comes from. If it is associated with an URI and its domain and path attribute are not speicifed, given URI will indicate where this cookie comes from.

        If a cookie corresponding to the given URI already exists, then it is replaced with the new one.

        Parameters:
        uri - the uri this cookie associated with. if null, this cookie will not be associated with an URI
        cookie - the cookie to store
        Throws:
        NullPointerException - if cookie is null
        See Also:
        get(java.net.URI)
      • get

        List<HttpCookie> get(URI uri)
        Retrieve cookies associated with given URI, or whose domain matches the given URI. Only cookies that have not expired are returned. This is called for every outgoing HTTP request.
        Returns:
        an immutable list of HttpCookie, return empty list if no cookies match the given URI
        Throws:
        NullPointerException - if uri is null
        See Also:
        add(java.net.URI, java.net.HttpCookie)
      • getCookies

        List<HttpCookie> getCookies()
        Get all not-expired cookies in cookie store.
        Returns:
        an immutable list of http cookies; return empty list if there's no http cookie in store
      • getURIs

        List<URI> getURIs()
        Get all URIs which identify the cookies in this cookie store.
        Returns:
        an immutable list of URIs; return empty list if no cookie in this cookie store is associated with an URI
      • remove

        boolean remove(URI uri,
                     HttpCookie cookie)
        Remove a cookie from store.
        Parameters:
        uri - the uri this cookie associated with. if null, the cookie to be removed is not associated with an URI when added; if not null, the cookie to be removed is associated with the given URI when added.
        cookie - the cookie to remove
        Returns:
        true if this store contained the specified cookie
        Throws:
        NullPointerException - if cookie is null
      • removeAll

        boolean removeAll()
        Remove all cookies in this cookie store.
        Returns:
        true if this store changed as a result of the call

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-java/net/CookieStore.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut