## com.sun.jersey.api.client
Class UniformInterfaceException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  com.sun.jersey.api.client.UniformInterfaceException

All Implemented Interfaces:
  java.io.Serializable

    public class UniformInterfaceException

extends java.lang.RuntimeException

A runtime exception thrown by a method on the `UniformInterface` or `ClientResponse` when the status code of the HTTP response indicates a response that is not expected.

Author:
  Paul.Sandoz@Sun.Com
See Also:
  Serialized Form

Constructor Summary
`UniformInterfaceException(ClientResponse r)` Construct a uniform interface exception.
`UniformInterfaceException(ClientResponse r, boolean bufferResponseEntity)` Construct a uniform interface exception.
`UniformInterfaceException(java.lang.String message, ClientResponse r)` Construct a uniform interface exception.
`UniformInterfaceException(java.lang.String message, ClientResponse r, boolean bufferResponseEntity)` Construct a uniform interface exception.

Method Summary
`ClientResponse` | `getResponse()` Get the client response assocatiated with the exception.

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

### UniformInterfaceException

    public UniformInterfaceException(ClientResponse r)

  Construct a uniform interface exception.

  The client response entity will be buffered by calling `ClientResponse.bufferEntity()`.

  Parameters:
    `r` - the client response. The message of the exception is set to r.toString();

### UniformInterfaceException

    public UniformInterfaceException(ClientResponse r,
                                     boolean bufferResponseEntity)

  Construct a uniform interface exception.

  Parameters:
    `r` - the client response. The message of the exception is set to r.toString();
    `bufferResponseEntity` - if true buffer the client response entity by calling `ClientResponse.bufferEntity()`.

### UniformInterfaceException

    public UniformInterfaceException(java.lang.String message,
                                     ClientResponse r)

  Construct a uniform interface exception.

  The client response entity will be buffered by calling `ClientResponse.bufferEntity()`.

  Parameters:
    `message` - the message of the exception.
    `r` - the client response.

### UniformInterfaceException

    public UniformInterfaceException(java.lang.String message,
                                     ClientResponse r,
                                     boolean bufferResponseEntity)

  Construct a uniform interface exception.

  Parameters:
    `message` - the message of the exception.
    `r` - the client response.
    `bufferResponseEntity` - if true buffer the client response entity by calling `ClientResponse.bufferEntity()`.

Method Detail

### getResponse

    public ClientResponse getResponse()

  Get the client response assocatiated with the exception.

  Returns:
    the client response.

Copyright © 2017 Oracle Corporation. All Rights Reserved.