Returns the amount of events left in the buffer at the moment (the amount can increase later if more events are read). @return The amount of events left or 0 there aren't any events
()
| 130 | * @return The amount of events left or 0 there aren't any events |
| 131 | */ |
| 132 | public int eventsLeftInBuffer() { |
| 133 | if (queue == null || queue.size() == 0) { |
| 134 | return 0; |
| 135 | } |
| 136 | else { |
| 137 | return this.queue.size() - this.nextEventIndex; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | |
| 142 | /** |
no outgoing calls