String charsetName = encodingMemento.getJavaCharsetName();
if (charsetName == null) {
charsetName = encodingMemento.getDetectedCharsetName();
}
if (!encodingMemento.isValid() && !forceDefault()) {
throw new UnsupportedCharsetExceptionWithDetail(encodingMemento);
}
if (fEncodingRule == EncodingRule.FORCE_DEFAULT) {
charsetName = encodingMemento.getAppropriateDefault();
}