text: public final CharsetEncoder replaceWith(byte[] replacement) {if (replacement == null) {throw new IllegalArgumentException("replacement == null");}if (replacement.length == 0) {throw new IllegalArgumentException("replacement.length == 0");}if (replacement.length > maxBytesPerChar()) {throw new IllegalArgumentException("replacement length > maxBytesPerChar: " +replacement.length + " > " + maxBytesPerChar());}if (!isLegalReplacement(replacement)) {throw new IllegalArgumentException("bad replacement: " + Arrays.toString(replacement));}this.replacementBytes = replacement;implReplaceWith(replacementBytes);return this;}