public final class

HttpException

extends Exception
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ chan.http.HttpException

Class Overview

Thrown by HTTP client and ChanPerformer methods.

Summary

Public Constructors
HttpException(int responseCode, String responseText)

Constructor for a HttpException with response code and message.

Public Methods
static HttpException createNotFoundException()

Creates a new instance of HttpException with 404 (Not Found) response code and an appropriate message.

int getResponseCode()

Returns response code.

boolean isHttpException()

Returns whether exception is HTTP protocol exception.

boolean isSocketException()

Returns whether exception is socket level exception.

[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public HttpException (int responseCode, String responseText)

Constructor for a HttpException with response code and message.

Parameters
responseCode int: Response code.
responseText String: Response message.

Public Methods

public static HttpException createNotFoundException ()

Creates a new instance of HttpException with 404 (Not Found) response code and an appropriate message.

Returns
HttpException Exception object.

public int getResponseCode ()

Returns response code.

Returns
int Response code.

public boolean isHttpException ()

Returns whether exception is HTTP protocol exception.

Returns
boolean

public boolean isSocketException ()

Returns whether exception is socket level exception.

Returns
boolean