private String resolveEncoding(final String feedName,
                                   final String streamTypeName,
                                   final String encoding) throws UnsupportedEncodingException {
        if (encoding != null && !encoding.isBlank()) {
            try {
                if (Charset.isSupported(encoding)) {
                    return encoding;
                }
            } catch (final RuntimeException e) {
                // Ignore.
            }

            final String message = "Unsupported encoding '" +
                    encoding +
                    "' for feed '" +
                    feedName +
                    "' and type '" +
                    streamTypeName +
                    "'. Using default '" +
                    StreamUtil.DEFAULT_CHARSET_NAME +
                    "'.";
            LOGGER.debug(message);
            throw new UnsupportedEncodingException(message);
        }

        return StreamUtil.DEFAULT_CHARSET_NAME;
    }
@param feedName            The feed name.
@param streamTypeName      The name of the stream type, e.g. Raw Reference
@param childStreamTypeName The name of the child stream type, e.g. Context, or null for the data child stream
                           or if not applicable
@return The applicable encoding
stroom-feed/stroom-feed-impl/src/main/java/stroom/feed/impl/FeedPropertiesImpl.java