Here you can find the source of leByteBuffer(int capacity)
public static ByteBuffer leByteBuffer(int capacity)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.nio.ByteOrder; public class Main { public static ByteBuffer leByteBuffer(int capacity) { // Creating the ByteBuffer over an underlying array makes // it easier to turn into a string later. byte[] underlying = new byte[capacity]; return ByteBuffer.wrap(underlying).order(ByteOrder.LITTLE_ENDIAN); }// w w w. j a v a2 s. c o m }