java.lang.Object
io.helidon.http.media.EntityReaderBase<T>
- Type Parameters:
T- type of the supported objects
- All Implemented Interfaces:
EntityReader<T>
Base for readers that care about charset.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static CharsetcontentTypeCharset(Headers headers) Get Content-Type from the provided headers (if available), then get its charset (if available), and return it, otherwise returnUTF-8.findContentTypeCharset(Headers headers) Get Content-Type from the provided headers (if available), then get its charset (if available), and return it, otherwise return empty optional.
-
Constructor Details
-
EntityReaderBase
protected EntityReaderBase()Constructor with no side effects.
-
-
Method Details
-
contentTypeCharset
Get Content-Type from the provided headers (if available), then get its charset (if available), and return it, otherwise returnUTF-8.- Parameters:
headers- headers that are expected to containContent-Typeheader- Returns:
- charset either from the header, or the default value provided
-
findContentTypeCharset
Get Content-Type from the provided headers (if available), then get its charset (if available), and return it, otherwise return empty optional.- Parameters:
headers- headers that are expected to containContent-Typeheader- Returns:
- charset from the header, or an empty optional
-