Constructor and Description |
---|
REDBlockIterator(byte[] buffer,
int offset,
int length)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
static REDBlock |
getPrimaryBlock(byte[] buffer,
int offset,
int length)
Gets the first RED block in the RED payload.
|
boolean |
hasNext() |
static boolean |
isMultiBlock(byte[] buffer,
int offset,
int length)
Returns
true if a specific RED packet contains multiple blocks;
false , otherwise. |
static REDBlock |
matchFirst(java.util.function.Predicate<REDBlock> predicate,
byte[] buffer,
int offset,
int length)
Matches a RED block in the RED payload.
|
REDBlock |
next() |
void |
remove() |
public REDBlockIterator(byte[] buffer, int offset, int length)
buffer
- the byte buffer that contains the RED payload.offset
- the offset in the buffer where the RED payload begins.length
- the length of the RED payload.public static REDBlock matchFirst(java.util.function.Predicate<REDBlock> predicate, byte[] buffer, int offset, int length)
predicate
- the predicate that is used to match the RED block.buffer
- the byte buffer that contains the RED payload.offset
- the offset in the buffer where the RED payload begins.length
- the length of the RED payload.public static REDBlock getPrimaryBlock(byte[] buffer, int offset, int length)
buffer
- the byte buffer that contains the RED payload.offset
- the offset in the buffer where the RED payload begins.length
- the length of the RED payload.public static boolean isMultiBlock(byte[] buffer, int offset, int length)
true
if a specific RED packet contains multiple blocks;
false
, otherwise.buffer
- the byte buffer that contains the RED payload.offset
- the offset in the buffer where the RED payload begins.length
- the length of the RED payload.public boolean hasNext()
hasNext
in interface java.util.Iterator<REDBlock>
public void remove()
remove
in interface java.util.Iterator<REDBlock>
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.