ContentEncoderpublic class ChunkEncoder extends AbstractContentEncoder
buffer, channel, completed, metrics| Constructor | Description |
|---|---|
ChunkEncoder(java.nio.channels.WritableByteChannel channel,
SessionOutputBuffer buffer,
org.apache.http.impl.io.HttpTransportMetricsImpl metrics) |
|
ChunkEncoder(java.nio.channels.WritableByteChannel channel,
SessionOutputBuffer buffer,
org.apache.http.impl.io.HttpTransportMetricsImpl metrics,
int fragementSizeHint) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
complete() |
Terminates the content stream.
|
java.lang.String |
toString() |
|
int |
write(java.nio.ByteBuffer src) |
Writes a portion of entity content to the underlying channel.
|
assertNotCompleted, flushToChannel, isCompleted, writeToBuffer, writeToChannel, writeToChannelpublic ChunkEncoder(java.nio.channels.WritableByteChannel channel,
SessionOutputBuffer buffer,
org.apache.http.impl.io.HttpTransportMetricsImpl metrics,
int fragementSizeHint)
channel - underlying channel.buffer - session buffer.metrics - transport metrics.fragementSizeHint - fragment size hint defining an minimal size of a fragment
that should be written out directly to the channel bypassing the session buffer.
Value 0 disables fragment buffering.public ChunkEncoder(java.nio.channels.WritableByteChannel channel,
SessionOutputBuffer buffer,
org.apache.http.impl.io.HttpTransportMetricsImpl metrics)
public int write(java.nio.ByteBuffer src)
throws java.io.IOException
ContentEncodersrc - The buffer from which content is to be retrievedjava.io.IOException - if I/O error occurs while writing contentpublic void complete()
throws java.io.IOException
ContentEncodercomplete in interface ContentEncodercomplete in class AbstractContentEncoderjava.io.IOException - if I/O error occurs while writing contentpublic java.lang.String toString()
toString in class java.lang.Object