public class Response extends Object
构造器和说明 |
---|
Response(HttpURLConnection conn,
Map<String,String> reHeader) |
限定符和类型 | 方法和说明 |
---|---|
String |
getContent() |
String |
getContent(String charsetName) |
Cookie |
getCookie() |
String |
getDetail() |
String |
getEncodeType()
根据Http头的Content-Type获取网页的编码类型,如果没有设的话则返回null
|
Header |
getHeader() |
String |
getProtocal() |
Reader |
getReader() |
Reader |
getReader(String charsetName) |
int |
getStatus() |
InputStream |
getStream() |
boolean |
isClientError() |
boolean |
isOK() |
boolean |
isServerError() |
void |
print(Writer writer) |
void |
print(Writer writer,
String charsetName) |
void |
printHeader(Writer writer) |
public Response(HttpURLConnection conn, Map<String,String> reHeader) throws IOException
IOException
public String getProtocal()
public int getStatus()
public String getDetail()
public boolean isOK()
public boolean isServerError()
public boolean isClientError()
public Header getHeader()
public String getEncodeType()
public InputStream getStream()
public Reader getReader()
public Cookie getCookie()
public void printHeader(Writer writer)
public void print(Writer writer)
public String getContent()
Copyright © 2017. All rights reserved.