/** * Get a byte iterator for a byte buffer. The buffer's position is kept up to date with the number of bytes * consumed by the iterator. The iterator cannot be moved before the position that the buffer had when the * iterator was constructed (this position is considered the zero offset). * * @param buffer the byte buffer (must not be {@code null}) * @return the byte iterator (not {@code null}) */ public static ByteIterator ofByteBuffer(ByteBuffer buffer) { Assert.checkNotNullParam("buffer", buffer); return new ByteBufferIterator(buffer); }
/** * Get a byte iterator for a byte buffer. The buffer's position is kept up to date with the number of bytes * consumed by the iterator. The iterator cannot be moved before the position that the buffer had when the * iterator was constructed (this position is considered the zero offset). * * @param buffer the byte buffer (must not be {@code null}) * @return the byte iterator (not {@code null}) */ public static ByteIterator ofByteBuffer(ByteBuffer buffer) { Assert.checkNotNullParam("buffer", buffer); return new ByteBufferIterator(buffer); }
/** * Get a byte iterator for a byte buffer. The buffer's position is kept up to date with the number of bytes * consumed by the iterator. The iterator cannot be moved before the position that the buffer had when the * iterator was constructed (this position is considered the zero offset). * * @param buffer the byte buffer (must not be {@code null}) * @return the byte iterator (not {@code null}) */ public static ByteIterator ofByteBuffer(ByteBuffer buffer) { Assert.checkNotNullParam("buffer", buffer); return new ByteBufferIterator(buffer); }