public class Response extends Object
Constructor and Description |
---|
Response() |
Response(HttpURLConnection conn,
Map<String,String> reHeader) |
Response(HttpURLConnection conn,
NutMap reHeader) |
Modifier and Type | Method and Description |
---|---|
String |
getContent() |
String |
getContent(String charsetName) |
Cookie |
getCookie() |
String |
getDetail() |
String |
getEncode() |
String |
getEncodeType()
根据Http头的Content-Type获取网页的编码类型,如果没有设的话则返回null
|
Header |
getHeader() |
String |
getProtocal()
Deprecated.
|
String |
getProtocol() |
Reader |
getReader() |
Reader |
getReader(Charset charset) |
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) |
void |
setEncode(String encode) |
public Response()
public Response(HttpURLConnection conn, Map<String,String> reHeader) throws IOException
IOException
public Response(HttpURLConnection conn, NutMap reHeader) throws IOException
IOException
public String getProtocol()
@Deprecated 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 void setEncode(String encode)
public String getEncode()
public InputStream getStream()
public Reader getReader()
public Cookie getCookie()
public void printHeader(Writer writer)
public void print(Writer writer)
public String getContent()
Copyright © 2019. All rights reserved.