docs: public void writeTo(File file) throws IOException {
          FileChannel channel = new FileOutputStream(file).getChannel();
          try {
              writeTo(channel);
          } finally {
              channel.close();
          }
      }