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.
[ Parent
| on HN ]
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