|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
com.google.api.client.http.HttpResponseException
public class HttpResponseException
Exception thrown when an error status code is detected in an HTTP response.
| Constructor Summary | |
|---|---|
HttpResponseException(HttpResponse response)
Constructor that uses computeMessage(HttpResponse) for the detail message. |
|
HttpResponseException(HttpResponse response,
String message)
Constructor that allows an alternative detail message to be used. |
|
| Method Summary | |
|---|---|
static String |
computeMessage(HttpResponse response)
Deprecated. (scheduled to be removed in 1.9) Use computeMessageBuffer(HttpResponse) |
static StringBuilder |
computeMessageBuffer(HttpResponse response)
Returns an exception message string builder to use for the given HTTP response. |
HttpHeaders |
getHeaders()
Returns the HTTP response headers. |
HttpResponse |
getResponse()
Deprecated. (scheduled to be removed in 1.9) |
int |
getStatusCode()
Returns the HTTP status code or 0 for none. |
boolean |
isSuccessStatusCode()
Returns whether received a successful HTTP status code >= 200 && < 300 (see
getStatusCode()). |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpResponseException(HttpResponse response)
computeMessage(HttpResponse) for the detail message.
response - HTTP response
public HttpResponseException(HttpResponse response,
String message)
response - HTTP responsemessage - detail message to use or null for none| Method Detail |
|---|
@Deprecated public final HttpResponse getResponse()
public boolean isSuccessStatusCode()
>= 200 && < 300 (see
getStatusCode()).
public int getStatusCode()
0 for none.
public HttpHeaders getHeaders()
@Deprecated public static String computeMessage(HttpResponse response)
computeMessageBuffer(HttpResponse)
public static StringBuilder computeMessageBuffer(HttpResponse response)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||