Closed GoogleCodeExporter closed 9 years ago
This doesn't have anything to do with ByteStreams.toByteArray. 300 MB is
generally too much to be loading into memory, and it isn't necessary at all in
your example. What you should be doing is this:
CRC32 crc32 = new CRC32();
File file = new File("test.zip");
long checksum = ByteStreams.getChecksum(
Files.newInputStreamSupplier(file), crc32);
Original comment by cgdec...@gmail.com
on 18 Feb 2011 at 4:32
Thanks, problem solved.
Original comment by ptr.nowi...@gmail.com
on 18 Feb 2011 at 5:43
Original comment by cgdec...@gmail.com
on 18 Feb 2011 at 9:46
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
ptr.nowi...@gmail.com
on 18 Feb 2011 at 3:42Attachments: