org.springframework.web
Class HttpMediaTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.servlet.ServletException
org.springframework.web.HttpMediaTypeException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- HttpMediaTypeNotAcceptableException, HttpMediaTypeNotSupportedException
public abstract class HttpMediaTypeException
- extends 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
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
HttpMediaTypeException
protected HttpMediaTypeException(String message)
- Create a new MediaTypeException.
- Parameters:
message
- the exception message
HttpMediaTypeException
protected HttpMediaTypeException(String message,
List<MediaType> supportedMediaTypes)
- Create a new HttpMediaTypeNotSupportedException.
- Parameters:
supportedMediaTypes
- the list of supported media types
getSupportedMediaTypes
public List<MediaType> getSupportedMediaTypes()
- Return the list of supported media types.