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

de.mklinger.commons.httpclient.internal.NoBodyProvider Maven / Gradle / Ivy

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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy