public class

HttpMediaTypeNotSupportedException

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

Class Overview

Exception thrown when a client POSTs or PUTs content not supported by request handler.

Summary

Public Constructors
HttpMediaTypeNotSupportedException(String message)
Create a new HttpMediaTypeNotSupportedException.
HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.
HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes, String msg)
Create a new HttpMediaTypeNotSupportedException.
Public Methods
MediaType getContentType()
Return the HTTP request content type method that caused the failure.
[Expand]
Inherited Methods
From class org.springframework.web.HttpMediaTypeException
From class javax.servlet.ServletException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public HttpMediaTypeNotSupportedException (String message)

Create a new HttpMediaTypeNotSupportedException.

Parameters
message the exception message

public HttpMediaTypeNotSupportedException (MediaType contentType, List<MediaType> supportedMediaTypes)

Create a new HttpMediaTypeNotSupportedException.

Parameters
contentType the unsupported content type
supportedMediaTypes the list of supported media types

public HttpMediaTypeNotSupportedException (MediaType contentType, List<MediaType> supportedMediaTypes, String msg)

Create a new HttpMediaTypeNotSupportedException.

Parameters
contentType the unsupported content type
supportedMediaTypes the list of supported media types
msg the detail message

Public Methods

public MediaType getContentType ()

Return the HTTP request content type method that caused the failure.