encoder = charset.newEncoder();
final CodingErrorAction malformedCharAction = (CodingErrorAction) params.getParameter(
CoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTION);
final CodingErrorAction unmappableCharAction = (CodingErrorAction) params.getParameter(
CoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTION);
decoder.onMalformedInput(malformedCharAction).onUnmappableCharacter(unmappableCharAction);
encoder.onMalformedInput(malformedCharAction).onUnmappableCharacter(unmappableCharAction);
}
this.inbuf = new SessionInputBufferImpl(buffersize, linebuffersize, decoder, allocator);
this.outbuf = new SessionOutputBufferImpl(buffersize, linebuffersize, encoder, allocator);
this.fragmentSizeHint = buffersize;