Esempio n. 1
0
 /**
  * Checks whether there are packets with sequence numbers between <tt>firstSeq</tt> and
  * <tt>lastSeq</tt> which are *not* stored in <tt>data</tt>.
  *
  * @return <tt>true</tt> if there are packets with sequence numbers between <tt>firstSeq</tt> and
  *     <tt>lastSeq</tt> which are *not* stored in <tt>data</tt>.
  */
 private boolean haveMissing() {
   Set<Long> seqs = data.keySet();
   long s = firstSeq;
   while (s != lastSeq) {
     if (!seqs.contains(s)) return true;
     s = (s + 1) % (1 << 16);
   }
   return false;
 }