Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ protected final JAXBContext getJaxbContext(Class<?> clazz) {
* Detect the charset from the given {@link HttpHeaders#getContentType()}.
* @param httpHeaders the current HTTP headers
* @return the charset defined in the content type header, or {@code null} if not found
* @since 6.2.8
*/
protected @Nullable Charset detectCharset(HttpHeaders httpHeaders) {
MediaType contentType = httpHeaders.getContentType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ protected Object readFromSource(Class<?> clazz, HttpHeaders headers, Source sour
}
}

/**
* Process {@code source} with {@code charset}.
* @param source source to process
* @param charset charset to use
* @return source
* @since 6.2.8
*/
protected Source processSource(Source source, @Nullable Charset charset) {
if (source instanceof StreamSource streamSource) {
InputSource inputSource = new InputSource(streamSource.getInputStream());
Expand Down