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
IOException
public DefaultHttpResponse(org.apache.http.HttpResponse response, Charset defaultCharset) throws IOException
IOException
public DefaultHttpResponse(org.apache.http.HttpResponse response, String defaultCharset) throws IOException
IOException
public DefaultHttpResponse(org.apache.http.HttpResponse response, Charset defaultCharset, boolean download) throws IOException
IOException
public DefaultHttpResponse(org.apache.http.HttpResponse response, Charset defaultCharset, boolean download, IFileHandler fileHandler) throws IOException
IOException
public DefaultHttpResponse(org.apache.http.HttpResponse response, String defaultCharset, boolean download) throws IOException
IOException
public DefaultHttpResponse(org.apache.http.HttpResponse response, String defaultCharset, boolean download, IFileHandler fileHandler) throws IOException
IOException
public int getStatusCode()
IHttpResponse
getStatusCode
in interface IHttpResponse
public String getReasonPhrase()
IHttpResponse
getReasonPhrase
in interface IHttpResponse
public Locale getLocale()
IHttpResponse
getLocale
in interface IHttpResponse
public String getContent()
IHttpResponse
getContent
in interface IHttpResponse
public IFileWrapper getFileWrapper()
IHttpResponse
getFileWrapper
in interface IHttpResponse
public String getContentType()
IHttpResponse
getContentType
in interface IHttpResponse
public long getContentLength()
IHttpResponse
getContentLength
in interface IHttpResponse
public String getContentEncoding()
IHttpResponse
getContentEncoding
in interface IHttpResponse
public Map<String,String> getHeaders()
IHttpResponse
getHeaders
in interface IHttpResponse
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2022. All rights reserved.