public abstract class HttpResponse extends AutoCloseable
Constructor and Description |
---|
HttpResponse() |
Modifier and Type | Method and Description |
---|---|
abstract InputStream |
getBodyStream()
Returns an input stream that reads from this open connection.
|
abstract java.lang.String |
getHeader(java.lang.String headerName)
Get the value of the specified header or null if the header isn't present.
|
abstract int |
getStatusCode()
Gets the status code from an HTTP response message (e.g.
|
abstract 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.
|
close
public abstract int getStatusCode()
public abstract java.lang.String getStatusMessage()
public abstract InputStream getBodyStream()
IOException
- if an I/O error occurs while creating the input stream@Nullable public abstract java.lang.String getHeader(java.lang.String headerName)
headerName
- HTTP header name