Class InvalidMediaTypeException

  • All Implemented Interfaces:
    java.io.Serializable

    public class InvalidMediaTypeException
    extends java.lang.IllegalArgumentException
    Exception thrown from MediaTypeUtils.parseMediaType(String) in case of encountering an invalid content type specification String.

    Created: 2019-06-18

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidMediaTypeException​(java.lang.String mediaType, java.lang.String message)
      Create a new InvalidContentTypeException for the given content type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMediaType()
      Return the offending media type.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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

      • InvalidMediaTypeException

        public InvalidMediaTypeException​(java.lang.String mediaType,
                                         java.lang.String message)
        Create a new InvalidContentTypeException for the given content type.
        Parameters:
        mediaType - the offending media type
        message - a detail message indicating the invalid part
    • Method Detail

      • getMediaType

        public java.lang.String getMediaType()
        Return the offending media type.
        Returns:
        the media type