public static final class Http1Client.Http1Response extends HttpClient.Response
Modifier and Type | Field and Description |
---|---|
private java.net.HttpURLConnection |
connection |
Modifier | Constructor and Description |
---|---|
private |
Http1Response(java.net.HttpURLConnection connection,
ProgressMonitor progressMonitor) |
Modifier and Type | Method and Description |
---|---|
void |
disconnect() |
java.lang.String |
getContentEncoding()
Returns the
Content-Encoding header. |
long |
getContentLength()
Returns the
Content-Length header. |
java.lang.String |
getContentType()
Returns the
Content-Type header. |
long |
getExpiration()
Returns the
Expire header. |
java.lang.String |
getHeaderField(java.lang.String name)
Returns the value of the named header field.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaderFields()
Returns an unmodifiable Map mapping header keys to a List of header values.
|
java.io.InputStream |
getInputStream() |
long |
getLastModified()
Returns the
Last-Modified header. |
java.lang.String |
getRequestMethod()
Returns the request method.
|
java.net.URL |
getURL()
Returns the URL.
|
debugRedirect, fetchContent, getContent, getContentReader, getResponseCode, getResponseMessage, uncompress, uncompressAccordingToContentDisposition
private final java.net.HttpURLConnection connection
private Http1Response(java.net.HttpURLConnection connection, ProgressMonitor progressMonitor) throws java.io.IOException
java.io.IOException
public java.net.URL getURL()
HttpClient.Response
getURL
in class HttpClient.Response
URLConnection.getURL()
public java.lang.String getRequestMethod()
HttpClient.Response
getRequestMethod
in class HttpClient.Response
HttpURLConnection.getRequestMethod()
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class HttpClient.Response
java.io.IOException
public java.lang.String getContentEncoding()
HttpClient.Response
Content-Encoding
header.getContentEncoding
in class HttpClient.Response
Content-Encoding
HTTP headerURLConnection.getContentEncoding()
public java.lang.String getContentType()
HttpClient.Response
Content-Type
header.getContentType
in class HttpClient.Response
Content-Type
HTTP headerURLConnection.getContentType()
public long getExpiration()
HttpClient.Response
Expire
header.getExpiration
in class HttpClient.Response
Expire
HTTP headerURLConnection.getExpiration()
public long getLastModified()
HttpClient.Response
Last-Modified
header.getLastModified
in class HttpClient.Response
Last-Modified
HTTP headerURLConnection.getLastModified()
public long getContentLength()
HttpClient.Response
Content-Length
header.getContentLength
in class HttpClient.Response
Content-Length
HTTP headerURLConnection.getContentLengthLong()
public java.lang.String getHeaderField(java.lang.String name)
HttpClient.Response
getHeaderField
in class HttpClient.Response
name
- the name of a header fieldnull
if there is no such field in the headerURLConnection.getHeaderField(String)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderFields()
HttpClient.Response
getHeaderFields
in class HttpClient.Response
URLConnection.getHeaderFields()
public void disconnect()
disconnect
in class HttpClient.Response
HttpURLConnection.disconnect()