This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
2) In the second part what buffer size am I allocating ?
Am I at risk of running out of memory in any case if say I have 3 threads running each handling a 800 MB file ?
Any help would be appreciated...
Why don't you tell us? .. in this topic, it was recommended that ... (1) you print out the buffer length, (2) you print out the value calculated from the expression, or (3) you work out the math on paper. Each of these options are easy and can be done in a few minutes.
As for running out of memory, we don't know the amount of memory of your machine, nor how much heap you have configured for your JVM.
In this case, it's only cool if it actually accomplishes something useful, which it doesn't: back before optimizing compilers, when we were writing in assembly, etc. a shift made sense. That hasn't been the case for quite some time now.