Example usage for java.net CookieStore getURIs

List of usage examples for java.net CookieStore getURIs

Introduction

In this page you can find the example usage for java.net CookieStore getURIs.

Prototype

public List<URI> getURIs();

Source Link

Document

Get all URIs which identify the cookies in this cookie store.

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();
    CookieStore cookieStore = cm.getCookieStore();

    List<URI> uriList = cookieStore.getURIs();
}