News for hackers. Stuff that matters.
Re:Ask HN: What is your startup's backup policy? by silvestrov on Sunday January 04, 2009 @06:11PM (#419684)
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.
Re:Ask HN: What is your startup's backup policy? by aschobel on Sunday January 04, 2009 @08:08PM (#419799)
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