docs: static void writeBytesToFile(File file, byte[] bytes) throws IOException {
          BufferedOutputStream bos = null;
  
          try {
              FileOutputStream fos = new FileOutputStream(file);
              bos = new BufferedOutputStream(fos);
              bos.write(bytes);
          } finally {
              if (bos != null) {
                  try  {
                      // flush and close the BufferedOutputStream
                      bos.flush();
                      bos.close();
                  } catch (Exception e) {}
              }
          }
      }