File to byte[] in Java

It depends on what best means for you. Productivity wise, don’t reinvent the wheel and use Apache Commons. Which is here FileUtils.readFileToByteArray(File input).

Leave a Comment