public class JavaHttpResponse extends HttpResponse
Modifier and Type | Class and Description |
---|---|
static class |
JavaHttpResponse.EmptyInputStream |
Modifier and Type | Method and Description |
---|---|
void |
close() |
InputStream |
getBodyStream()
Returns an input stream that reads from this open connection.
|
java.lang.String |
getHeader(java.lang.String headerName)
Get the value of the specified header or null if the header isn't present.
|
int |
getStatusCode()
Gets the status code from an HTTP response message (e.g.
|
java.lang.String |
getStatusMessage()
Gets the message from the HTTP response status line--the "reason phrase" (which is what the RFC calls it)
describing the error that comes after the status code.
|
public int getStatusCode()
HttpResponse
getStatusCode
in class HttpResponse
public java.lang.String getStatusMessage()
HttpResponse
getStatusMessage
in class HttpResponse
public java.lang.String getHeader(java.lang.String headerName)
HttpResponse
getHeader
in class HttpResponse
headerName
- HTTP header namepublic InputStream getBodyStream()
HttpResponse
getBodyStream
in class HttpResponse
public void close()
close
in interface java.lang.AutoCloseable
close
in class AutoCloseable