public void clear(){
  infoQueue.clear();
  while (!dataQueue.isEmpty()) {
    allocator.release(dataQueue.remove());
  }
  totalBytesDropped=0;
  totalBytesWritten=0;
  lastAllocation=null;
  lastAllocationOffset=allocationLength;
}

public void clear ( ) { infoQueue . clear ( ) ; while ( ! dataQueue . isEmpty ( ) ) { allocator . release ( dataQueue . remove ( ) ) ; } totalBytesDropped = 0 ; totalBytesWritten = 0 ; lastAllocation = null ; lastAllocationOffset = allocationLength ; }
clears the buffer , returning all allocations to the allocator .
