public class UnsupportedMediaTypeException extends NestedRuntimeException
Content-Type
がサポートされていないことを示すためにスローされる例外。コンストラクターと説明 |
---|
UnsupportedMediaTypeException(MediaType contentType, ListSE<MediaType> supportedTypes) Content-Type を解析できるが、サポートされていない場合のコンストラクター。 |
UnsupportedMediaTypeException(MediaType contentType, ListSE<MediaType> supportedTypes, ResolvableType bodyType) 特定の Java 型からエンコードまたはデコードしようとする場合のコンストラクター。 |
UnsupportedMediaTypeException(StringSE reason) 指定された Content-Type が無効な場合のコンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
ResolvableType | getBodyType() この例外が生成されたコンテキストのボディ型を返します。 |
MediaType | getContentType() 正常に解析された場合はリクエストの Content-Type ヘッダーを返し、そうでない場合は null を返します。 |
ListSE<MediaType> | getSupportedMediaTypes() Content-Type ヘッダーが解析されているがサポートされていない場合はサポートされているコンテンツ型のリストを返し、そうでない場合は空のリストを返します。 |
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressedSE, fillInStackTraceSE, getCauseSE, getLocalizedMessageSE, getStackTraceSE, getSuppressedSE, initCauseSE, printStackTraceSE, printStackTraceSE, printStackTraceSE, setStackTraceSE, toStringSE
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public UnsupportedMediaTypeException(StringSE reason)
public UnsupportedMediaTypeException(@Nullable MediaType contentType, ListSE<MediaType> supportedTypes)
@Nullable public MediaType getContentType()
null
を返します。public ListSE<MediaType> getSupportedMediaTypes()
@Nullable public ResolvableType getBodyType()
null