code: public static File writeDataToFile(final byte[] data, final File file, final boolean append) {
  		try (FileOutputStream out = new FileOutputStream(file, append)) {
  			out.write(data);
  			out.flush();
  			out.close();
  			return file;
  		} catch (Exception e) {
  			JKExceptionUtil.handle(e);
  			return null;
  		}
  	}
docs: Write data to file.
  
  @param data   the data
  @param file   the file
  @param append the append
  @return the file