3 ms·
You forgot to close the BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); so you'll run out of file descriptions if backing up too m
by silvestrov 18y ago
You forgot to close the
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
so you'll run out of file descriptions if backing up too many files. And bis.read(jpgByte); doesn't necessary read all of the files; at least som java versions on some Solaris versions doesn't.
- aschobel 18y agoI'm so incredibly sorry about that. The contract for InputStream.read is very clear, that was needlessly sloppy. New version is up. Also includes the unit test that should have been there in the first place. grumble http://3banana.com/pics/S3BackupTest.java http://3banana.com/pics/S3BackupTest.java