public class HttpResponseException extends ClientProtocolException
| 构造器和说明 |
|---|
HttpResponseException(int statusCode,
String reasonPhrase)
Constructs a new instance of
HttpResponseException with the given
status code and reason phrase, and no content bytes or content type. |
HttpResponseException(int statusCode,
String reasonPhrase,
byte[] contentBytes,
ContentType contentType)
Constructs a new instance of
HttpResponseException with the given
status code, reason phrase, content bytes, and content type. |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
getContentBytes() |
ContentType |
getContentType() |
String |
getReasonPhrase() |
int |
getStatusCode() |
public HttpResponseException(int statusCode,
String reasonPhrase)
HttpResponseException with the given
status code and reason phrase, and no content bytes or content type.statusCode - the HTTP status codereasonPhrase - the reason phrase associated with the HTTP status codepublic HttpResponseException(int statusCode,
String reasonPhrase,
byte[] contentBytes,
ContentType contentType)
HttpResponseException with the given
status code, reason phrase, content bytes, and content type.statusCode - the HTTP status codereasonPhrase - the reason phrase associated with the HTTP status codecontentBytes - the content bytes of the HTTP responsecontentType - the content type of the HTTP responsepublic int getStatusCode()
public String getReasonPhrase()
public byte[] getContentBytes()
public ContentType getContentType()
Copyright © 2023. All rights reserved.