Class CookieJar

  • All Implemented Interfaces:
    Serializable

    public class CookieJar
    extends Object
    implements Serializable
    Generic class to hold onto HTTP cookies. Can record, retrieve, and persistently store cookies associated with particular URLs.
    Author:
    JAX-RPC Development Team
    See Also:
    Serialized Form
    • Constructor Detail

      • CookieJar

        public CookieJar()
        Create a new, empty cookie jar.
    • Method Detail

      • recordAnyCookies

        public void recordAnyCookies​(URLConnection connection)
        Records any cookies which have been sent as part of an HTTP response. The connection parameter must be already have been opened, so that the response headers are available. It's ok to pass a non-HTTP URL connection, or one which does not have any set-cookie headers.
      • applyRelevantCookies

        public void applyRelevantCookies​(URLConnection connection)