Here you can find the source of copyIntBuffer(IntBuffer paramIntBuffer)
public static IntBuffer copyIntBuffer(IntBuffer paramIntBuffer)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; public class Main { public static IntBuffer copyIntBuffer(IntBuffer paramIntBuffer) { return copyIntBufferAsByteBuffer(paramIntBuffer).asIntBuffer(); }/*from ww w. j a v a2 s . c o m*/ public static ByteBuffer copyIntBufferAsByteBuffer( IntBuffer paramIntBuffer) { ByteBuffer localByteBuffer = newByteBuffer(paramIntBuffer .remaining() * 4); paramIntBuffer.mark(); localByteBuffer.asIntBuffer().put(paramIntBuffer); paramIntBuffer.reset(); localByteBuffer.rewind(); return localByteBuffer; } public static ByteBuffer newByteBuffer(int paramInt) { ByteBuffer localByteBuffer = ByteBuffer.allocateDirect(paramInt); localByteBuffer.order(ByteOrder.nativeOrder()); return localByteBuffer; } }