Java Utililty Methods ByteBuffer Skip

List of utility methods to do ByteBuffer Skip

Description

The list of methods to do ByteBuffer Skip are organized into topic(s).

Method

voidbufferSkip(ByteBuffer buffer, int count)
buffer Skip
buffer.position(buffer.position() + count);
voidiskip(ByteBuffer byteBuffer, int intsToSkip)
iskip
nskip(byteBuffer, intsToSkip, 4);
intskip(ByteBuffer buffer, int count)
skip
int toSkip = Math.min(buffer.remaining(), count);
buffer.position(buffer.position() + toSkip);
return toSkip;
voidskip(ByteBuffer buffer, int length)
Increment position in buffer.
buffer.position(buffer.position() + length);
voidskip(ByteBuffer dest, int length)
skip
dest.position(dest.position() + length);
ByteBuffer[]skipBufs(ByteBuffer[] bufs, int nextWithRemaining)
skip Bufs
int newSize = bufs.length - nextWithRemaining;
ByteBuffer[] temp = new ByteBuffer[newSize];
for (int i = 0; i < newSize; i++) {
    temp[i] = bufs[i + nextWithRemaining];
return temp;
voidskipBytes(ByteBuffer buf, int count)
Skip a specified number of bytes, i.e., advance the buffer's position.
buf.position(buf.position() + count);
voidskipChars(ByteBuffer buffer, byte[] chars)
skip Chars
while (buffer.hasRemaining()) {
    byte b = buffer.get();
    if (contains(chars, b)) {
        continue;
    } else {
        buffer.position(buffer.position() - 1);
        break;
voidskipToNALUnit(ByteBuffer buf)
skip To NAL Unit
if (!buf.hasRemaining())
    return;
int val = 0xffffffff;
while (buf.hasRemaining()) {
    val <<= 8;
    val |= (buf.get() & 0xff);
    if ((val & 0xffffff) == 1) {
        buf.position(buf.position());
...
voidskipUnknown(ByteBuffer buf, int length)
skip Unknown
buf.position(buf.position() + length);