totalRead += len;
} else {
if (!this.buffer.hasData() && this.endOfStream) {
this.state = COMPLETED;
this.completed = true;
throw new TruncatedChunkException("Truncated chunk "
+ "( expected size: " + this.chunkSize
+ "; actual size: " + this.pos + ")");
}
}