de.mklinger.commons.httpclient.internal.NoBodyProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of httpclient Show documentation
Show all versions of httpclient Show documentation
HTTP client with support for HTTP/2 and Java 8
The newest version!
package de.mklinger.commons.httpclient.internal;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.Iterator;
import org.eclipse.jetty.client.api.ContentProvider;
import de.mklinger.commons.httpclient.HttpRequest;
public class NoBodyProvider implements HttpRequest.BodyProvider, ContentProvider {
private static final NoBodyProvider INSTANCE = new NoBodyProvider();
public static NoBodyProvider getInstance() {
return INSTANCE;
}
@Override
public Iterator iterator() {
return Collections.emptyIterator();
}
@Override
public long getLength() {
return 0;
}
}