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

org.robolectric.shadows.httpclient.HttpEntityStub Maven / Gradle / Ivy

There is a newer version: 4.14.1
Show newest version
package org.robolectric.shadows.httpclient;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;

public class HttpEntityStub implements HttpEntity {
  @Override
  public boolean isRepeatable() {
    return true;
  }

  @Override
  public boolean isChunked() {
    throw new UnsupportedOperationException();
  }

  @Override
  public long getContentLength() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Header getContentType() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Header getContentEncoding() {
    throw new UnsupportedOperationException();
  }

  @Override
  public InputStream getContent() throws IOException, IllegalStateException {
    throw new UnsupportedOperationException();
  }

  @Override
  public void writeTo(OutputStream outputStream) throws IOException {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean isStreaming() {
    throw new UnsupportedOperationException();
  }

  @Override
  public void consumeContent() throws IOException {
    throw new UnsupportedOperationException();
  }

  public static interface ResponseRule {
    boolean matches(HttpRequest request);

    HttpResponse getResponse() throws HttpException, IOException;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy