Interface ResourceCharsetDetector

All Known Implementing Classes:
ResourceCharsetDetectorSPI, YamlMediaType

public interface ResourceCharsetDetector
Detects the Charset of a Resource.

This interface is typically not used directly by Resource API users (who would just use MediaType.charset() on an AbstractResource.mediaType()). Instead, it is normally implemented by (some) *MediaType API implementations, for Charset detection that is specific to a given MediaType (if any). For example, RFC 4627 §3 specifies how to determine the encoding of JSON, or https://yaml.org/spec §5.2. specifies ditto for YAML.