public class JdkHttpClientResponse extends Object implements HttpClientResponse
| 构造器和说明 |
|---|
JdkHttpClientResponse(HttpURLConnection conn) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
close response InputStream.
|
InputStream |
getBody()
Return the body of the message as an input stream.
|
Header |
getHeaders()
Return the headers of this message.
|
int |
getStatusCode()
Return the HTTP status code.
|
String |
getStatusText()
Return the HTTP status text of the response.
|
public JdkHttpClientResponse(HttpURLConnection conn)
public Header getHeaders()
HttpClientResponsegetHeaders 在接口中 HttpClientResponsenull)public InputStream getBody() throws IOException
HttpClientResponsegetBody 在接口中 HttpClientResponseIOException - IOExceptionpublic int getStatusCode()
throws IOException
HttpClientResponsegetStatusCode 在接口中 HttpClientResponseIOException - IOExceptionpublic String getStatusText() throws IOException
HttpClientResponsegetStatusText 在接口中 HttpClientResponseIOException - IOExceptionpublic void close()
HttpClientResponseclose 在接口中 HttpClientResponseclose 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2018–2022 Alibaba Group. All rights reserved.