Example usage for java.net HttpCookie hashCode

List of usage examples for java.net HttpCookie hashCode

Introduction

In this page you can find the example usage for java.net HttpCookie hashCode.

Prototype

@Override
public int hashCode() 

Source Link

Document

Returns the hash code of this HTTP cookie.

Usage

From source file:Main.java

public static void main(String[] args) throws Exception {
    CookieManager cm = new CookieManager();
    cm.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
    CookieHandler.setDefault(cm);

    new URL("http://google.com").openConnection().getContent();

    List<HttpCookie> cookies = cm.getCookieStore().getCookies();
    for (HttpCookie cookie : cookies) {
        System.out.println(cookie.hashCode());
        System.out.println();/*  www  .j  a v  a 2 s.c o  m*/
    }
}