Java ByteBuffer Capacity leByteBuffer(int capacity)

Here you can find the source of leByteBuffer(int capacity)

Description

le Byte Buffer

License

Open Source License

Declaration

public static ByteBuffer leByteBuffer(int capacity) 

Method Source Code

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

Related

  1. expand(ByteBuffer buffer, int newCapacity)
  2. getByteBuffer(int capacity)
  3. grow(ByteBuffer buffer, int minCapacityIncrease)
  4. growBuffer(ByteBuffer b, int newCapacity)
  5. increaseCapacity(ByteBuffer buffer, int size)
  6. nativeByteBuffer(int capacity)
  7. newByteBuffer(int margin, int capacity)
  8. parseToByteBuffer(int capacity, String value)
  9. resetAddressAndCapacity(final ByteBuffer byteBuffer, final long address, final int capacity)