callbackCompleteViaTruncation = (FileGetCompletionCallback) getter;
long rafSize = dis.readLong();
if(fileCompleteViaTruncation.length() != rafSize)
throw new ResumeFailedException("Storage file is not of the correct length");
// FIXME check against finalLength too, maybe we can finish straight away.
this.raf = new PooledFileRandomAccessBuffer(fileCompleteViaTruncation, false, rafSize, null, -1, true);
} else {
this.raf = BucketTools.restoreRAFFrom(dis, context.persistentFG, context.persistentFileTracker, context.getPersistentMasterSecret());
fileCompleteViaTruncation = null;
callbackCompleteViaTruncation = null;
}