docs: public static void writeFile(byte[] data, File outFile) throws IOException {
          // create parent dirs when necessary
          if (outFile.getParentFile() != null) {
              outFile.getParentFile().mkdirs();
          }
          try (FileOutputStream fos = new FileOutputStream(outFile)) {
              fos.write(data);
          }
      }