HttpExceptionpublic class HttpException extends Exception A class representing exceptional (i.e., non 200) responses from an HTTP
Server. |
Fields Summary |
---|
public static final int | SC_BAD_REQUEST | public static final int | SC_UNAUTHORIZED | public static final int | SC_FORBIDDEN | public static final int | SC_NOT_FOUND | public static final int | SC_CONFLICT | public static final int | SC_GONE | public static final int | SC_INTERNAL_SERVER_ERROR | private final int | statusCode | private final InputStream | responseStream |
Constructors Summary |
---|
public HttpException(String message, int statusCode, InputStream responseStream)Creates an HttpException with the given message, statusCode and
responseStream.
//TODO: also record response headers?
super(message);
this.statusCode = statusCode;
this.responseStream = responseStream;
|
Methods Summary |
---|
public java.io.InputStream | getResponseStream()
return responseStream;
| public int | getStatusCode()Gets the status code associated with this exception.
return statusCode;
|
|