code: public void setFlags(TapRequestFlag f) {
      if (!flagList.contains(f)) {
        if (!hasFlags) {
          hasFlags = true;
          extralength += 4;
          totalbody += 4;
        }
        if (f.equals(TapRequestFlag.BACKFILL)) {
          hasBackfill = true;
          totalbody += 8;
        }
        if (f.equals(TapRequestFlag.LIST_VBUCKETS)
          || f.equals(TapRequestFlag.TAKEOVER_VBUCKETS)) {
          hasVBucketList = true;
          totalbody += 2;
        }
        if (f.equals(TapRequestFlag.CHECKPOINT)) {
          hasVBucketCheckpoints = true;
          totalbody += 2;
        }
        flagList.add(f);
      }
    }
docs: Sets the flags for the tap stream. These flags decide what kind of tap
  stream will be received.
  
  @param f The flags to use for this tap stream.