docs: public void sync() {
  
          if (isClosed) {
              return;
          }
  
          synchronized (fileStreamOut) {
              if (needsSync) {
                  if (busyWriting) {
                      forceSync = true;
  
                      return;
                  }
  
                  try {
                      fileStreamOut.flush();
                      outDescriptor.sync();
  
                      syncCount++;
                  } catch (IOException e) {
                      Error.printSystemOut("flush() or sync() error: "
                                           + e.toString());
                  }
  
                  needsSync = false;
                  forceSync = false;
              }
          }
      }