blob: 3d3c05c6d7ded87d17809a404ad019ea43bd665b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
package com.xtremelabs.robolectric.tester.org.apache.http;
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;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class HttpEntityStub implements HttpEntity {
@Override public boolean isRepeatable() {
throw new UnsupportedOperationException();
}
@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;
}
}
|