public class DefaultHttpResponse extends Object implements IHttpResponse
| Constructor and Description |
|---|
DefaultHttpResponse(org.apache.http.HttpResponse response) |
DefaultHttpResponse(org.apache.http.HttpResponse response,
Charset defaultCharset) |
DefaultHttpResponse(org.apache.http.HttpResponse response,
Charset defaultCharset,
boolean download) |
DefaultHttpResponse(org.apache.http.HttpResponse response,
Charset defaultCharset,
boolean download,
IFileHandler fileHandler) |
DefaultHttpResponse(org.apache.http.HttpResponse response,
String defaultCharset) |
DefaultHttpResponse(org.apache.http.HttpResponse response,
String defaultCharset,
boolean download) |
DefaultHttpResponse(org.apache.http.HttpResponse response,
String defaultCharset,
boolean download,
IFileHandler fileHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getContent()
获取响应内容
|
String |
getContentEncoding()
获取内容编码字符集
|
long |
getContentLength()
获取内容长度
|
String |
getContentType()
获取内容类型
|
IFileWrapper |
getFileWrapper()
获取文件包装器
|
Map<String,String> |
getHeaders()
获取响应头集合
|
Locale |
getLocale()
获取Locale对象
|
String |
getReasonPhrase()
获取原因说明
|
int |
getStatusCode()
获取HTTP状态码
|
String |
toString() |
public DefaultHttpResponse(org.apache.http.HttpResponse response)
throws IOException
IOExceptionpublic DefaultHttpResponse(org.apache.http.HttpResponse response,
Charset defaultCharset)
throws IOException
IOExceptionpublic DefaultHttpResponse(org.apache.http.HttpResponse response,
String defaultCharset)
throws IOException
IOExceptionpublic DefaultHttpResponse(org.apache.http.HttpResponse response,
Charset defaultCharset,
boolean download)
throws IOException
IOExceptionpublic DefaultHttpResponse(org.apache.http.HttpResponse response,
Charset defaultCharset,
boolean download,
IFileHandler fileHandler)
throws IOException
IOExceptionpublic DefaultHttpResponse(org.apache.http.HttpResponse response,
String defaultCharset,
boolean download)
throws IOException
IOExceptionpublic DefaultHttpResponse(org.apache.http.HttpResponse response,
String defaultCharset,
boolean download,
IFileHandler fileHandler)
throws IOException
IOExceptionpublic int getStatusCode()
IHttpResponsegetStatusCode in interface IHttpResponsepublic String getReasonPhrase()
IHttpResponsegetReasonPhrase in interface IHttpResponsepublic Locale getLocale()
IHttpResponsegetLocale in interface IHttpResponsepublic String getContent()
IHttpResponsegetContent in interface IHttpResponsepublic IFileWrapper getFileWrapper()
IHttpResponsegetFileWrapper in interface IHttpResponsepublic String getContentType()
IHttpResponsegetContentType in interface IHttpResponsepublic long getContentLength()
IHttpResponsegetContentLength in interface IHttpResponsepublic String getContentEncoding()
IHttpResponsegetContentEncoding in interface IHttpResponsepublic Map<String,String> getHeaders()
IHttpResponsegetHeaders in interface IHttpResponsepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2022. All rights reserved.