LongBuffer.put(long[] src, int offset, int length) has the following syntax.
public LongBuffer put(long[] src, int offset, int length)
In the following code shows how to use LongBuffer.put(long[] src, int offset, int length) method.
import java.nio.LongBuffer; /*www.ja v a2 s .co m*/ public class Main { public static void main(String[] args) { LongBuffer bb = LongBuffer.allocate(10); bb.put(new long[]{100,123,123,123,1},0,1); System.out.println(bb.toString()); } }
The code above generates the following result.