docs: public static void writeFile(final File file, final FileOutput output, final IProgressMonitor monitor) throws CoreException {
          try (FileOutputStream fout = new FileOutputStream(file);
                  BufferedOutputStream bout = new BufferedOutputStream(fout)) {
              if (monitor != null) {
                  monitor.subTask("writing data to " + file.getName());
              }
              output.writeFile(bout);
              bout.flush();
          } catch (IOException e) {
              IStatus status = FindbugsPlugin.createErrorStatus("Exception while " + output.getTaskDescription(), e);
              throw new CoreException(status);
          }
      }