Package org.apache.qpid.protonj2.buffer
Interface ProtonBufferIterator
public interface ProtonBufferIterator
An 
Iterator like API for accessing the underlying bytes of the
 target buffer one at a time.- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFunctional interface for defining standard or commonly used consumers of the bytes provided by aProtonBufferIterator.
- 
Method SummaryModifier and TypeMethodDescriptiondefault intforEach(ProtonBufferIterator.ByteConsumer consumer) booleanhasNext()Called to check if more bytes are available from this iterator.bytenext()Fetch the next byte from the buffer iterator.intoffset()Returns the current offset into the buffer from where iteration started.int
- 
Method Details- 
hasNextboolean hasNext()Called to check if more bytes are available from this iterator.- Returns:
- true if there is another byte available or false if at the end of the buffer.
 
- 
nextbyte next()Fetch the next byte from the buffer iterator.- Returns:
- the next available byte from the buffer iterator.
- Throws:
- NoSuchElementException- if there is no next byte available.
 
- 
remainingint remaining()- Returns:
- the number of remaining bytes that can be read from this iterator.
 
- 
offsetint offset()Returns the current offset into the buffer from where iteration started.- Returns:
- the current offset into the buffer from where iteration started.
 
- 
forEach- Parameters:
- consumer- The consumer of the iterated bytes.
- Returns:
- the number of bytes that were iterated or -1 if iteration ended early.
 
 
-