- boolean addChunk(int chunkIndex, ByteString chunk, Optional<Integer> lastChunkHashCode) throws InvalidChunkException{
- if(sealed){
- throw new InvalidChunkException("Invalid chunk received with chunkIndex " + chunkIndex + " all chunks already received");
+ boolean addChunk(int chunkIndex, byte[] chunk, Optional<Integer> maybeLastChunkHashCode)
+ throws InvalidChunkException, IOException {
+ log.debug("addChunk: chunkIndex={}, lastChunkIndex={}, collectedChunks.size={}, lastChunkHashCode={}",
+ chunkIndex, lastChunkIndex, count, this.lastChunkHashCode);
+
+ if (sealed) {
+ throw new InvalidChunkException("Invalid chunk received with chunkIndex " + chunkIndex
+ + " all chunks already received");