Unthrown Exceptions
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@940061 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
80415614f7
commit
fd513425a1
|
@ -435,8 +435,7 @@ public class CachingHttpClient implements HttpClient {
|
|||
return backendResponse;
|
||||
}
|
||||
|
||||
protected SizeLimitedResponseReader getResponseReader(HttpResponse backEndResponse)
|
||||
throws IOException {
|
||||
protected SizeLimitedResponseReader getResponseReader(HttpResponse backEndResponse) {
|
||||
return new SizeLimitedResponseReader(maxObjectSizeBytes, backEndResponse);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,8 +52,7 @@ public class SizeLimitedResponseReader {
|
|||
private byte[] sizeLimitedContent;
|
||||
private boolean outputStreamConsumed;
|
||||
|
||||
public SizeLimitedResponseReader(int maxResponseSizeBytes, HttpResponse response)
|
||||
throws IOException {
|
||||
public SizeLimitedResponseReader(int maxResponseSizeBytes, HttpResponse response) {
|
||||
this.maxResponseSizeBytes = maxResponseSizeBytes;
|
||||
this.response = response;
|
||||
}
|
||||
|
@ -116,14 +115,14 @@ public class SizeLimitedResponseReader {
|
|||
return sizeLimitedContent;
|
||||
}
|
||||
|
||||
public HttpResponse getReconstructedResponse() throws IOException {
|
||||
public HttpResponse getReconstructedResponse() {
|
||||
|
||||
InputStream combinedStream = getCombinedInputStream();
|
||||
|
||||
return constructResponse(response, combinedStream);
|
||||
}
|
||||
|
||||
protected InputStream getCombinedInputStream() throws IOException {
|
||||
protected InputStream getCombinedInputStream() {
|
||||
InputStream input1 = new ByteArrayInputStream(getResponseBytes());
|
||||
InputStream input2 = getContentInputStream();
|
||||
return new CombinedInputStream(input1, input2);
|
||||
|
@ -134,7 +133,7 @@ public class SizeLimitedResponseReader {
|
|||
}
|
||||
|
||||
protected HttpResponse constructResponse(HttpResponse originalResponse,
|
||||
InputStream combinedStream) throws IOException {
|
||||
InputStream combinedStream) {
|
||||
HttpResponse response = new BasicHttpResponse(originalResponse.getProtocolVersion(),
|
||||
HttpStatus.SC_OK, "Success");
|
||||
|
||||
|
|
Loading…
Reference in New Issue