public abstract class CacheResponse extends Object
CacheResponse object provides an InputStream to access the response body and a Map for the response headers.ResponseCache| Constructor and Description |
|---|
CacheResponse() |
| Modifier and Type | Method and Description |
|---|---|
abstract InputStream |
getBody()
Returns an
InputStream to access the response body. |
abstract Map<String,List<String>> |
getHeaders()
Returns an immutable
Map which contains the response headers
information. |
public abstract InputStream getBody() throws IOException
InputStream to access the response body.InputStream which can be used to fetch the response
body.IOException - if an I/O error is encountered while retrieving the response
body.public abstract Map<String,List<String>> getHeaders() throws IOException
Map which contains the response headers
information. Note that URLConnection may need the original headers to be
able to fully reconstruct the response. In particular, failure to provide
a mapping from null to the original HTTP status line will prevent an
HttpURLConnection from returning the correct response code.
See URLConnection.getHeaderFields().Map which contains the response headers.IOException - if an I/O error is encountered while retrieving the response
headers.