Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.web
Class HttpMediaTypeException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              javax.servlet.ServletException
                  org.springframework.web.HttpMediaTypeException

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  HttpMediaTypeNotAcceptableException, HttpMediaTypeNotSupportedException

    public abstract class HttpMediaTypeException

extends javax.servlet.ServletException

Abstract base for exceptions related to media types. Adds a list of supported `MediaTypes`.

Since:
  3.0
Author:
  Arjen Poutsma
See Also:
  Serialized Form

Constructor Summary
`protected` | `HttpMediaTypeException(java.lang.String message)` Create a new MediaTypeException.
`protected` | `HttpMediaTypeException(java.lang.String message, java.util.List<MediaType> supportedMediaTypes)` Create a new HttpMediaTypeNotSupportedException.

Method Summary
`java.util.List<MediaType>` | `getSupportedMediaTypes()` Return the list of supported media types.

Methods inherited from class javax.servlet.ServletException
`getRootCause`

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

### HttpMediaTypeException

    protected HttpMediaTypeException(java.lang.String message)

  Create a new MediaTypeException.

  Parameters:
    `message` - the exception message

### HttpMediaTypeException

    protected HttpMediaTypeException(java.lang.String message,
                                     java.util.List<MediaType> supportedMediaTypes)

  Create a new HttpMediaTypeNotSupportedException.

  Parameters:
    `supportedMediaTypes` - the list of supported media types

Method Detail

### getSupportedMediaTypes

    public java.util.List<MediaType> getSupportedMediaTypes()

  Return the list of supported media types.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD