@NotThreadSafe public class LengthDelimitedEncoder extends AbstractContentEncoder implements FileContentEncoder
Content-Length header. Entities transferred using this stream can be maximum
This decoder is optimized to transfer data directly from
FileChannel to the underlying I/O session's channel whenever
possible avoiding intermediate buffering in the session buffer.
|Constructor and Description|
|Modifier and Type||Method and Description|
Transfers a portion of entity content from the given file channel to the underlying network channel.
Writes a portion of entity content to the underlying channel.
assertNotCompleted, complete, isCompleted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public int write(ByteBuffer src) throws IOException
public long transfer(FileChannel src, long position, long count) throws IOException
src- the source FileChannel to transfer data from.
position- The position within the file at which the transfer is to begin; must be non-negative
count- The maximum number of bytes to be transferred; must be non-negative
Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.