// size the buffer to the amount of bytes available:
// firstBuffer = Arrays.copyOf(firstBuffer, bytesRead);
cachedBinary = new CachedByteArray(firstBuffer, bytesRead);
size = (long) bytesRead;
} else {
cachedBinary = new CachedByteArrays(lruCapacity, bufferCapacity, firstBuffer, bufferCapacity);
tempFile = ArchiveFileUtils.writeEntryToTemp(tempDir, firstBuffer, in);
cachedBinary.setSourceFile(tempFile);
size = tempFile.length();
}