Package org.springframework.web.accept
Interface MediaTypeFileExtensionResolver
- All Known Implementing Classes:
AbstractMappingContentNegotiationStrategy
,ContentNegotiationManager
,MappingMediaTypeFileExtensionResolver
,ParameterContentNegotiationStrategy
,PathExtensionContentNegotiationStrategy
,ServletPathExtensionContentNegotiationStrategy
public interface MediaTypeFileExtensionResolver
Strategy to resolve a
MediaType
to a list of file extensions —
for example, to resolve "application/json" to "json".- Since:
- 3.2
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionGet all registered file extensions.resolveFileExtensions
(MediaType mediaType) Resolve the given media type to a list of file extensions.
-
Method Details
-
resolveFileExtensions
Resolve the given media type to a list of file extensions.- Parameters:
mediaType
- the media type to resolve- Returns:
- a list of extensions or an empty list (never
null
)
-
getAllFileExtensions
Get all registered file extensions.- Returns:
- a list of extensions or an empty list (never
null
)
-