decoder = charset.newDecoder();
encoder = charset.newEncoder();
final CodingErrorAction malformedCharAction = HttpProtocolParams.getMalformedInputAction(params);
final CodingErrorAction unmappableCharAction = HttpProtocolParams.getUnmappableInputAction(params);
decoder.onMalformedInput(malformedCharAction);
decoder.onUnmappableCharacter(unmappableCharAction);
encoder.onMalformedInput(malformedCharAction);
encoder.onUnmappableCharacter(unmappableCharAction);
}
this.inbuf = new SessionInputBufferImpl(buffersize, linebuffersize, decoder, allocator);
this.outbuf = new SessionOutputBufferImpl(buffersize, linebuffersize, encoder, allocator);