code: private void writeSyncList() throws CmsException {
  
          // the sync list file in the server file system
          File syncListFile;
          syncListFile = new File(m_destinationPathInRfs, SYNCLIST_FILENAME);
  
          // prepare the streams to write the data
          FileOutputStream fOut = null;
          PrintWriter pOut = null;
          try {
              fOut = new FileOutputStream(syncListFile);
              pOut = new PrintWriter(fOut);
              pOut.println(CmsSynchronizeList.getFormatDescription());
  
              // get all keys from the hash map and make an iterator on it
              Iterator<CmsSynchronizeList> values = m_newSyncList.values().iterator();
              // loop through all values and write them to the sync list file in
              // a human readable format
              while (values.hasNext()) {
                  CmsSynchronizeList sync = values.next();
                  //fOut.write(sync.toString().getBytes());
                  pOut.println(sync.toString());
              }
          } catch (IOException e) {
              throw new CmsDbIoException(Messages.get().container(Messages.ERR_IO_WRITE_SYNCLIST_0), e);
          } finally {
              // close all streams that were used
              try {
                  if (pOut != null) {
                      pOut.flush();
                      pOut.close();
                  }
                  if (fOut != null) {
                      fOut.flush();
                      fOut.close();
                  }
              } catch (IOException e) {
                  // ignore
              }
          }
      }
docs: Writes the synchronization list of the current sync process to the
  server file system. <p>
  
  The file can be found in the synchronization folder
  @throws CmsException if something goes wrong