public void setCharacterEncoding(String char_encoding) {
this.char_encoding_ = char_encoding;
if (this.char_encoding_ != null) {
Charset charset = Charset.forName(char_encoding_);
this.char_decoder_ = charset.newDecoder();
this.char_encoder_ = charset.newEncoder();
char_decoder_.onMalformedInput(CodingErrorAction.IGNORE);
char_decoder_.onUnmappableCharacter(CodingErrorAction.IGNORE);
ByteBuffer replacement = charset.encode(BAD_INPUT_REPLACEMENT);
byte[] replace_bytes = new byte[replacement.remaining()];