final SessionOutputBuffer buffer,
final HttpTransportMetricsImpl metrics) {
if (len == ContentLengthStrategy.CHUNKED) {
return new ChunkEncoder(channel, buffer, metrics, this.fragmentSizeHint);
} else if (len == ContentLengthStrategy.IDENTITY) {
return new IdentityEncoder(channel, buffer, metrics, this.fragmentSizeHint);
} else {
return new LengthDelimitedEncoder(channel, buffer, metrics, len, this.fragmentSizeHint);
}
}