Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I'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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: