code: public final CharsetDecoder replaceWith(String newReplacement) {
          if (newReplacement == null)
              throw new IllegalArgumentException("Null replacement");
          int len = newReplacement.length();
          if (len == 0)
              throw new IllegalArgumentException("Empty replacement");
          if (len > maxCharsPerByte)
              throw new IllegalArgumentException("Replacement too long");
  
  
  
  
          this.replacement = newReplacement;
          implReplaceWith(newReplacement);
          return this;
      }
docs: Changes this decoder's replacement value.
  
  <p> This method invokes the {@link #implReplaceWith implReplaceWith}
  method, passing the new replacement, after checking that the new
  replacement is acceptable.  </p>
  
  @param  newReplacement
  
  
  The new replacement; must not be <tt>null</tt>
  and must have non-zero length
  
  
  
  
  
  
  
  
  @return  This decoder
  
  @throws  IllegalArgumentException
  If the preconditions on the parameter do not hold