1 package org.robolectric.shadows.httpclient;
2 
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.OutputStream;
6 import org.apache.http.Header;
7 import org.apache.http.HttpEntity;
8 import org.apache.http.HttpException;
9 import org.apache.http.HttpRequest;
10 import org.apache.http.HttpResponse;
11 
12 public class HttpEntityStub implements HttpEntity {
13   @Override
isRepeatable()14   public boolean isRepeatable() {
15     return true;
16   }
17 
18   @Override
isChunked()19   public boolean isChunked() {
20     throw new UnsupportedOperationException();
21   }
22 
23   @Override
getContentLength()24   public long getContentLength() {
25     throw new UnsupportedOperationException();
26   }
27 
28   @Override
getContentType()29   public Header getContentType() {
30     throw new UnsupportedOperationException();
31   }
32 
33   @Override
getContentEncoding()34   public Header getContentEncoding() {
35     throw new UnsupportedOperationException();
36   }
37 
38   @Override
getContent()39   public InputStream getContent() throws IOException, IllegalStateException {
40     throw new UnsupportedOperationException();
41   }
42 
43   @Override
writeTo(OutputStream outputStream)44   public void writeTo(OutputStream outputStream) throws IOException {
45     throw new UnsupportedOperationException();
46   }
47 
48   @Override
isStreaming()49   public boolean isStreaming() {
50     throw new UnsupportedOperationException();
51   }
52 
53   @Override
consumeContent()54   public void consumeContent() throws IOException {
55     throw new UnsupportedOperationException();
56   }
57 
58   public static interface ResponseRule {
matches(HttpRequest request)59     boolean matches(HttpRequest request);
60 
getResponse()61     HttpResponse getResponse() throws HttpException, IOException;
62   }
63 }
64