Here you can find the source of skip(ByteBuffer buffer, int count)
public static int skip(ByteBuffer buffer, int count)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { public static int skip(ByteBuffer buffer, int count) { int toSkip = Math.min(buffer.remaining(), count); buffer.position(buffer.position() + toSkip); return toSkip; }/* w w w.j a v a2 s . c o m*/ }