public class HttpClientResponseImpl extends HttpResponseImpl implements HttpClientResponse
HttpClientResponse
interface.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>
HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodeProperty
HttpBodyAccessor.HttpBodyBuilder<B extends HttpBodyAccessor.HttpBodyBuilder<B>>, HttpBodyAccessor.HttpBodyMutator, HttpBodyAccessor.HttpBodyProperty, HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>
HttpInputStreamAccessor.HttpInputStreamBuilder<B extends HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, HttpInputStreamAccessor.HttpInputStreamMutator, HttpInputStreamAccessor.HttpInputStreamProperty, HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends Exception>
Modifier and Type | Field and Description |
---|---|
protected MediaTypeFactoryLookup |
_mediaTypeFactoryLookup |
_httpStatusCode
Constructor and Description |
---|
HttpClientResponseImpl(HttpStatusCode aHttpStatusCode,
ResponseHeaderFields aHeaderFields,
InputStream aHttpInputStream,
MediaTypeFactoryLookup aMediaTypeFactoryLookup)
Constructs a
HttpClientResponse with all required attributes. |
Modifier and Type | Method and Description |
---|---|
String |
getHttpBody()
Retrieves the HTTP body from the HTTP body property.
|
InputStream |
getHttpInputStream()
Retrieves the
InputStream from the HTTP InputStream
property. |
<RES> RES |
getResponse(Class<RES> aResponseType)
Retrieves the object representing the response body.
|
getHeaderFields, getHttpStatusCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHeaderFields
getHttpStatusCode
protected MediaTypeFactoryLookup _mediaTypeFactoryLookup
public HttpClientResponseImpl(HttpStatusCode aHttpStatusCode, ResponseHeaderFields aHeaderFields, InputStream aHttpInputStream, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
HttpClientResponse
with all required attributes.aHttpStatusCode
- The HttpStatusCode
of the response.aHeaderFields
- The ResponseHeaderFields
sent by the
response.aHttpInputStream
- The InputStream
representing the
request's HTTP body.aMediaTypeFactoryLookup
- The lookup factory for retrieving the
required MediaType
factories.public <RES> RES getResponse(Class<RES> aResponseType) throws BadResponseException
HttpClientResponse
getResponse
in interface HttpClientResponse
aResponseType
- The type of which the response is expected to be.BadResponseException
public InputStream getHttpInputStream()
HttpInputStreamAccessor
InputStream
from the HTTP InputStream
property.getHttpInputStream
in interface HttpInputStreamAccessor
InputStream
stored by the InputStream
property.public String getHttpBody()
HttpBodyAccessor
getHttpBody
in interface HttpBodyAccessor
Copyright © 2017. All rights reserved.