@NotThreadSafe public class ChunkEncoder extends AbstractContentEncoder
buffer, channel, completed, metrics
Constructor and Description |
---|
ChunkEncoder(WritableByteChannel channel,
SessionOutputBuffer buffer,
HttpTransportMetricsImpl metrics) |
Modifier and Type | Method and Description |
---|---|
void |
complete()
Terminates the content stream.
|
String |
toString() |
int |
write(ByteBuffer src)
Writes a portion of entity content to the underlying channel.
|
assertNotCompleted, isCompleted
public ChunkEncoder(WritableByteChannel channel, SessionOutputBuffer buffer, HttpTransportMetricsImpl metrics)
public int write(ByteBuffer src) throws IOException
ContentEncoder
src
- The buffer from which content is to be retrievedIOException
- if I/O error occurs while writing contentpublic void complete() throws IOException
ContentEncoder
complete
in interface ContentEncoder
complete
in class AbstractContentEncoder
IOException
- if I/O error occurs while writing contentCopyright © 2005-2015 The Apache Software Foundation. All Rights Reserved.