It may well do the right thing, but it's certainly not going to be very efficient, as discussed above. And it's likely that it won't work right for control characters like CR ('\r') and CTRL-D/Z (EOF indicator on text files). It may well work OK if you open the file in binary mode, but I doubt << operator is guaranteed for binary input.
--
Mats