Optimal method for writing bytes to file
Given the care and effort that has been put into performance within the JVM and Java standard libraries, it is a virtual certainty that the second implementation will be faster.

However, does it really matter? Worrying about optimization is generally only useful if the system performance is inadequate. It's far more important to worry about functionality and readability first. Performance issues can be tackled (if they exist) when the system is nearing completion and it is possible to get actual performance data on where the bottlenecks are.

See the Wikipedia article on Program Optimization - especially the "When to optimize" section