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

de.mklinger.qetcher.client.httpclient.internal.NoBodyProvider Maven / Gradle / Ivy

There is a newer version: 2.0.42.rc
Show newest version
package de.mklinger.commons.httpclient.internal;

import java.nio.ByteBuffer;
import java.util.Iterator;
import java.util.concurrent.CompletableFuture;

import de.mklinger.commons.httpclient.HttpRequest;

public class NoBodyProvider implements HttpRequest.BodyProvider {
	private static final NoBodyProvider INSTANCE = new NoBodyProvider();

	public static NoBodyProvider getInstance() {
		return INSTANCE;
	}

	private NoBodyProvider() {}

	@Override
	public long contentLength() {
		return 0;
	}

	@Override
	public Iterator> iterator() {
		throw new UnsupportedOperationException();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy