All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.dongliu.requests.NopCookieJar Maven / Gradle / Ivy

There is a newer version: 5.0.8
Show newest version
package net.dongliu.requests;

import jdk.nashorn.internal.ir.annotations.Immutable;

import javax.annotation.Nonnull;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * Cookie jar that do nothing. Used for plain request.
 */
@Immutable
class NopCookieJar implements CookieJar {

    static final NopCookieJar instance = new NopCookieJar();

    private NopCookieJar() {
    }

    @Override
    public void storeCookies(Collection cookies) {

    }

    @Nonnull
    @Override
    public List getCookies(URL url) {
        return Collections.emptyList();
    }

    @Nonnull
    @Override
    public Collection getCookies() {
        return Collections.emptyList();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy