> I've never copied one stream to another by hand, byte by byte.
Yeah, but you've probably done a read and write independently. This is just about joining the two together.
> There's a method in one of the apache commons libraries for that.
Yup, and that's great to use that, and you'll no doubt end up with more efficient code most of the time if you do. But... you still should be able to write correct code for reading bytes from one stream, writing to another, without losing data in between.
Yeah, but you've probably done a read and write independently. This is just about joining the two together.
> There's a method in one of the apache commons libraries for that.
Yup, and that's great to use that, and you'll no doubt end up with more efficient code most of the time if you do. But... you still should be able to write correct code for reading bytes from one stream, writing to another, without losing data in between.