private static void writeToFile(@NotNull File file, byte @NotNull [] content, int off, int len, boolean append) throws IOException {
    createParentDirs(file);

    try (OutputStream stream = new FileOutputStream(file, append)) {
      stream.write(content, off, len);
    }
  }
private static void writeToFile(@NotNull File file, byte @NotNull [] content, int off, int len, boolean append)