Here you can find the source of makeByteBuffer(byte[] i_arr)
public static ByteBuffer makeByteBuffer(byte[] i_arr)
//package com.java2s; import java.nio.ByteBuffer; public class Main { public static ByteBuffer makeByteBuffer(byte[] i_arr) { ByteBuffer bb = ByteBuffer.allocateDirect(i_arr.length); bb.put(i_arr);/*from w w w . j av a 2 s .c o m*/ bb.position(0); return bb; } }