com.stackmob.sdk.exception
Class StackMobHTTPResponseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.stackmob.sdk.exception.StackMobException
              extended by com.stackmob.sdk.exception.StackMobHTTPResponseException
All Implemented Interfaces:
Serializable

public class StackMobHTTPResponseException
extends StackMobException

An exception generated by a failed request. It contains information about the failure.

See Also:
Serialized Form

Constructor Summary
StackMobHTTPResponseException(Integer code, List<Map.Entry<String,String>> headers, byte[] body)
          create a new exception with info about the error response
 
Method Summary
 byte[] getBody()
          get the response body
 Integer getCode()
          get the response code
 List<Map.Entry<String,String>> getHeaders()
          get the response headers
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StackMobHTTPResponseException

public StackMobHTTPResponseException(Integer code,
                                     List<Map.Entry<String,String>> headers,
                                     byte[] body)
create a new exception with info about the error response

Parameters:
code - the response code
headers - headers from the response
body - the response body
Method Detail

getCode

public Integer getCode()
get the response code

Returns:
the code

getHeaders

public List<Map.Entry<String,String>> getHeaders()
get the response headers

Returns:
the headers

getBody

public byte[] getBody()
get the response body

Returns:
the body


Copyright © 2013 StackMob. All Rights Reserved.