/**
  * Sets converter into substitution mode. In substitution mode, the converter will replace
  * untranslatable characters in the source encoding with the substitution character set by
  * setSubstitionChars. When not in substitution mode, the converter will throw an
  * UnknownCharacterException when it encounters untranslatable input.
  *
  * @param doSub if true, enable substitution mode.
  * @see #setSubstitutionChars
  */
 public void setSubstitutionMode(boolean doSub) {
   super.setSubstitutionMode(doSub);
   if (decoder != null)
     decoder.onUnmappableCharacter(doSub ? CodingErrorAction.REPLACE : CodingErrorAction.REPORT);
 }
 /** Resets converter to its initial state. */
 public void reset() {
   super.reset();
   decoder.reset();
   src = null;
   dst = null;
 }