public abstract class BaseMediaChunkIterator extends java.lang.Object implements MediaChunkIterator
MediaChunkIterators. Handles next() and isEnded(), and
provides a bounds check for child classes.EMPTY| Constructor and Description |
|---|
BaseMediaChunkIterator(long fromIndex,
long toIndex)
Creates base iterator.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInBounds()
Verifies that the iterator points to a valid element.
|
protected long |
getCurrentIndex()
Returns the current index this iterator is pointing to.
|
boolean |
isEnded()
Returns whether the iteration has reached the end of the available data.
|
boolean |
next()
Moves the iterator to the next media chunk.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChunkEndTimeUs, getChunkStartTimeUs, getDataSpecpublic BaseMediaChunkIterator(long fromIndex,
long toIndex)
fromIndex - The index at which the iterator will start.toIndex - The last available index.public boolean isEnded()
MediaChunkIteratorisEnded in interface MediaChunkIteratorpublic boolean next()
MediaChunkIteratorCheck the return value or MediaChunkIterator.isEnded() to determine whether the iterator reached the
end of the available data.
next in interface MediaChunkIteratorprotected void checkInBounds()
java.util.NoSuchElementException - If the iterator does not point to a valid element.protected long getCurrentIndex()