FileDocCategorySizeDatePackage
HttpRetryException.javaAPI DocJava SE 5 API2022Fri Aug 26 14:57:08 BST 2005java.net

HttpRetryException

public class HttpRetryException extends IOException
Thrown to indicate that a HTTP request needs to be retried but cannot be retried automatically, due to streaming mode being enabled.
author
Michael McMahon
version
1.1, 04/20/04
since
1.5

Fields Summary
private int
responseCode
private String
location
Constructors Summary
public HttpRetryException(String detail, int code)
Constructs a new HttpRetryException from the specified response code and exception detail message

param
detail the detail message.
param
code the HTTP response code from server.

	super(detail);
	responseCode = code;
    
public HttpRetryException(String detail, int code, String location)
Constructs a new HttpRetryException with detail message responseCode and the contents of the Location response header field.

param
detail the detail message.
param
code the HTTP response code from server.
param
location the URL to be redirected to

	super (detail);
	responseCode = code;
	this.location = location;
    
Methods Summary
public java.lang.StringgetLocation()
Returns the value of the Location header field if the error resulted from redirection.

return
The location string

        return location;
    
public java.lang.StringgetReason()
Returns a string explaining why the http request could not be retried.

return
The reason string

        return super.getMessage();
    
public intresponseCode()
Returns the http response code

return
The http response code.

        return responseCode;