Java ByteBuffer Skip skipBytes(ByteBuffer buf, int count)

Here you can find the source of skipBytes(ByteBuffer buf, int count)

Description

Skip a specified number of bytes, i.e., advance the buffer's position.

License

Open Source License

Parameter

Parameter Description
buf The ByteBuffer to change the position of.
count The number of bytes to skip.

Exception

Parameter Description
IllegalArgumentException if the buffer's current position plusthe count is either negative or greater than the buffer's limit.

Declaration

public static void skipBytes(ByteBuffer buf, int count) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;

public class Main {
    /**/*from   w  ww .  j  a v  a2 s.  co m*/
     * Skip a specified number of bytes, i.e., advance the buffer's position.
     *
     * @param buf The {@link ByteBuffer} to change the position of.
     * @param count The number of bytes to skip.
     * @throws IllegalArgumentException if the buffer's current position plus
     * the count is either negative or greater than the buffer's limit.
     */
    public static void skipBytes(ByteBuffer buf, int count) {
        buf.position(buf.position() + count);
    }
}

Related

  1. iskip(ByteBuffer byteBuffer, int intsToSkip)
  2. skip(ByteBuffer buffer, int count)
  3. skip(ByteBuffer buffer, int length)
  4. skip(ByteBuffer dest, int length)
  5. skipBufs(ByteBuffer[] bufs, int nextWithRemaining)
  6. skipChars(ByteBuffer buffer, byte[] chars)
  7. skipToNALUnit(ByteBuffer buf)
  8. skipUnknown(ByteBuffer buf, int length)