Name
HttpRetryException
Synopsis
An
exception of this type is thrown when an HTTP request needs to be
retried (due to a server redirect or authentication request, for
example) but the protocol handler cannot automatically retry it
because the HttpURLConnection
has been placed in
streaming mode. (See the setFixedLengthStreamingMode(
)
and setChunkedStreamingMode( )
methods
of HttpURLConnection
.) The methods of the
exception provide details about how the request should be retried.
Figure 12-4. java.net.HttpRetryException
public class HttpRetryException extends java.io.IOException { // Public Constructors public HttpRetryException(String detail, int code); public HttpRetryException(String detail, int code, String location); // Public Instance Methods public String getLocation( ); public String getReason( ); public int responseCode( ); }
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.