private void writePartial(final IncomingChangeListData data, boolean haveNoMoreIncoming) throws IOException {
    File partialFile = getPartialPath(data.indexEntry.offset);
    final int accounted = data.accountedChanges.size();
    if (haveNoMoreIncoming || accounted == data.changeList.getChanges().size()) {
      partialFile.delete();
    }
    else if (accounted > 0) {
      try (RandomAccessFile file = new RandomAccessFile(partialFile, "rw")) {
        file.writeInt(accounted);
        for (Change c : data.accountedChanges) {
          boolean isAfterRevision = true;
          ContentRevision revision = c.getAfterRevision();
          if (revision == null) {
            isAfterRevision = false;
            revision = c.getBeforeRevision();
            assert revision != null;
          }
          file.writeByte(isAfterRevision ? 1 : 0);
          file.writeUTF(revision.getFile().getIOFile().toString());
        }
      }
    }
  }
private void writePartial(final IncomingChangeListData data, boolean haveNoMoreIncoming)