Android ByteBuffer Create makeByteBuffer(byte[] i_arr)

Here you can find the source of makeByteBuffer(byte[] i_arr)

Description

make Byte Buffer

Declaration

public static ByteBuffer makeByteBuffer(byte[] i_arr) 

Method Source Code

//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;
    }
}

Related

  1. ConvToByteBuffer(byte buf[])
  2. makeByteBuffer(byte[] arr)
  3. makeByteBuffer(byte[] arr)
  4. makeByteBuffer(byte[] arr)
  5. makeByteBuffer(byte[] arr, int length)
  6. makeByteBuffer(int size)
  7. makeByteBuffer(int size)
  8. makeByteBuffer(int size)
  9. copyFromStreamToBuffer(ByteBuffer out, DataInputStream in, int length)