text: public virtual bool isLegalReplacement(byte[] replacement_1){if (decoder == null){decoder = cs.newDecoder();decoder.onMalformedInput(java.nio.charset.CodingErrorAction.REPORT);decoder.onUnmappableCharacter(java.nio.charset.CodingErrorAction.REPORT);}java.nio.ByteBuffer @in = java.nio.ByteBuffer.wrap(replacement_1);java.nio.CharBuffer @out = java.nio.CharBuffer.allocate((int)(replacement_1.Length* decoder.maxCharsPerByte()));java.nio.charset.CoderResult result = decoder.decode(@in, @out, true);return !result.isError();}