net.dongliu.requests.NopCookieJar Maven / Gradle / Ivy
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