public class HttpResponseWrapper extends java.lang.Object implements HttpResponse
HttpResponse.Builder
Constructor and Description |
---|
HttpResponseWrapper(HttpToolResponse delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
code()
The HTTP status code.
|
java.io.InputStream |
getContent()
The response body, or null if no body.
|
long |
getContentLength()
The length of the content, if known.
|
<any> |
headers() |
java.lang.String |
reasonPhrase()
The HTTP reason phrase.
|
public HttpResponseWrapper(HttpToolResponse delegate)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public int code()
HttpResponse
code
in interface HttpResponse
public java.lang.String reasonPhrase()
HttpResponse
reasonPhrase
in interface HttpResponse
public <any> headers()
headers
in interface HttpResponse
public long getContentLength()
HttpResponse
getContentLength
in interface HttpResponse
Long.MAX_VALUE
,
a negative number is returned.public java.io.InputStream getContent()
HttpResponse
getContent
in interface HttpResponse