Android APIs
public class

HttpRetryException

extends IOException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.io.IOException
         ↳ java.net.HttpRetryException

Class Overview

If a HTTP request has to be retried, this exception will be thrown if the request cannot be retried automatically.

Summary

Public Constructors
HttpRetryException(String detail, int code)
Creates a new HttpRetryException instance with the specified response code and the given detail message.
HttpRetryException(String detail, int code, String location)
Creates a new HttpRetryException instance with the specified response code, the given detail message and the value of the location field from the response header.
Public Methods
String getLocation()
Gets the location value.
String getReason()
Gets the detail message.
int responseCode()
Gets the response code.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public HttpRetryException (String detail, int code)

Added in API level 1

Creates a new HttpRetryException instance with the specified response code and the given detail message.

Parameters
detail the detail message for this exception.
code the HTTP response code from target host.

public HttpRetryException (String detail, int code, String location)

Added in API level 1

Creates a new HttpRetryException instance with the specified response code, the given detail message and the value of the location field from the response header.

Parameters
detail the detail message for this exception.
code the HTTP response code from target host.
location the destination URL of the redirection.

Public Methods

public String getLocation ()

Added in API level 1

Gets the location value.

Returns
  • the stored location from the HTTP header.

public String getReason ()

Added in API level 1

Gets the detail message.

Returns
  • the detail message.

public int responseCode ()

Added in API level 1

Gets the response code.

Returns
  • the HTTP response code.