if (decoder instanceof FileContentDecoder) {
transferred = ((FileContentDecoder)decoder).transfer(
this.fileChannel, this.idx, Integer.MAX_VALUE);
} else {
transferred = this.fileChannel.transferFrom(
new ContentDecoderChannel(decoder), this.idx, Integer.MAX_VALUE);
}
if (transferred > 0) {
this.idx += transferred;
}
if (decoder.isCompleted()) {