Provides sequential access to a DBuffer's elements. Using a DBufferIter is more efficient than calling getByte repeatedly. The DBufferIter becomes invalid if its DBuffer adds or removes elements, and should be reset with setBuffer or setIndex.
The default constructor.
Creates a DBufferIter that points to the same DBuffer and element as source.
Sets this DBufferIter to point to the same DBuffer and element as source.
Returns true if the iterator has passed the end of the DBuffer, and value should no longer be called.
Moves to the next element in the DBuffer. After calling next, finished should be called to check if the iterator has moved past the DBuffer's last element.
Set the DBuffer to iterate through. The index is set to zero.
Moves the iterator to point to the specified index in the DBuffer. Calling this function repeatedly is inefficient, use next instead. Throws an exception if index is out of bounds.
Returns the value of the byte pointed to by this iterator. Should not be called if finished returned true, or if this iterator doesn't point to a valid DBuffer.