Set new replacement value. This method first checks the given replacement's validity, then changes the replacement value, and at last calls {@link #implReplaceWith(byte[]) implReplaceWith} method with the givennew replacement as argument.
@param replacement the replacement byte array, cannot be null or empty, its length cannot larger than maxBytesPerChar, and must be legal replacement, which can be justified by isLegalReplacement(byte[] repl)
@return this encoder
@throws IllegalArgumentException if the given replacement cannot satisfy the requirement metioned above
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.