This decoder is optimized to transfer data directly from the underlying
I/O session's channel to a FileChannel, whenever
possible avoiding intermediate buffering in the session buffer.
| Access | Constructor and Description |
|---|---|
| public | IdentityDecoder(final ReadableByteChannel channel, final SessionInputBuffer buffer, final BasicHttpTransportMetrics metrics)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | read(final ByteBuffer
The buffer into which entity content is to be transferred dst)Implements org. |
| public String | |
| public long | transfer(final FileChannel
the target FileChannel to transfer data into. dst, final long The position within the file at which the transfer is to begin;
must be non-negative.
Must be less than or equal to the size of the file position, final long The maximum number of bytes to be transferred; must be
non-negative count)Implements org. |
| IdentityDecoder | back to summary |
|---|---|
| public IdentityDecoder(final ReadableByteChannel channel, final SessionInputBuffer buffer, final BasicHttpTransportMetrics metrics) | |
| read | back to summary |
|---|---|
| public int read(final ByteBuffer dst) throws IOException Implements org. Doc from org. Reads a portion of content from the underlying channel
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| transfer | back to summary |
|---|---|
| public long transfer(final FileChannel dst, final long position, final long count) throws IOException Implements org. Doc from org. Transfers a portion of entity content from the underlying network channel into the given file channel. Warning Many implementations cannot write beyond the length of the file. If the position exceeds the channel's size, some implementations may throw an IOException.
| |