code: public static void writeByteArrayToFile(final File file, final byte[] byteArray)
  		throws IOException
  	{
  		try (FileOutputStream fos = new FileOutputStream(file);
  			BufferedOutputStream bos = new BufferedOutputStream(fos))
  		{
  			bos.write(byteArray);
  		}
  		catch (final FileNotFoundException ex)
  		{
  			throw ex;
  		}
  		catch (final IOException ex)
  		{
  			throw ex;
  		}
  	}
docs: Writes the given byte array to the given file.
  
  @param file
  The file.
  @param byteArray
  The byte array.
  @throws IOException
  Signals that an I/O exception has occurred.