Package com.naver.ads.network.raw
Class BufferedHttpResponse
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class BufferedHttpResponse extends HttpResponse
HTTP response which will buffer the response's body when it is read.
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpRequestrequestprivate final IntegerstatusCodeprivate final HttpHeadersheadersprivate final ByteArraybody
-
Constructor Summary
Constructors Constructor Description BufferedHttpResponse(HttpRequest request, Integer statusCode, HttpHeaders headers, ByteArray body)Constructs a new BufferedHttpResponse instance.
-
Method Summary
Modifier and Type Method Description HttpRequestgetRequest()the request which resulted in this response. IntegergetStatusCode()the response status code. HttpHeadersgetHeaders()the all response headers. final ByteArraygetBody()the response's content as a ByteArray. ByteArraygetBodyAsByteArray()Returns the response content as a ByteArray Unitclose()BufferedHttpResponse pre-reads the inputStream into the buffer and uses it, so calling close does nothing. Booleanequals(Object other)IntegerhashCode()-
-
Constructor Detail
-
BufferedHttpResponse
BufferedHttpResponse(HttpRequest request, Integer statusCode, HttpHeaders headers, ByteArray body)
Constructs a new BufferedHttpResponse instance.
-
-
Method Detail
-
getRequest
HttpRequest getRequest()
the request which resulted in this response.
-
getStatusCode
Integer getStatusCode()
the response status code.
-
getHeaders
HttpHeaders getHeaders()
the all response headers.
-
getBodyAsByteArray
ByteArray getBodyAsByteArray()
Returns the response content as a ByteArray
-
close
Unit close()
BufferedHttpResponse pre-reads the inputStream into the buffer and uses it, so calling close does nothing.
-
-
-
-