FileDocCategorySizeDatePackage
HttpException.javaAPI DocAndroid 1.5 API1385Wed May 06 22:41:16 BST 2009com.google.wireless.gdata.client

HttpException

public class HttpException extends Exception
A class representing exceptional (i.e., non 200) responses from an HTTP Server.

Fields Summary
public static final int
SC_BAD_REQUEST
public static final int
SC_UNAUTHORIZED
public static final int
SC_FORBIDDEN
public static final int
SC_NOT_FOUND
public static final int
SC_CONFLICT
public static final int
SC_GONE
public static final int
SC_INTERNAL_SERVER_ERROR
private final int
statusCode
private final InputStream
responseStream
Constructors Summary
public HttpException(String message, int statusCode, InputStream responseStream)
Creates an HttpException with the given message, statusCode and responseStream.


               
  //TODO: also record response headers?
      
        
    super(message);
    this.statusCode = statusCode;
    this.responseStream = responseStream;
  
Methods Summary
public java.io.InputStreamgetResponseStream()

return
the error response stream from the server.

    return responseStream;
  
public intgetStatusCode()
Gets the status code associated with this exception.

return
the status code returned by the server, typically one of the SC_* constants.

    return statusCode;