Android ShortBuffer Create newShortBuffer(int paramInt)

Here you can find the source of newShortBuffer(int paramInt)

Description

new Short Buffer

Declaration

public static ShortBuffer newShortBuffer(int paramInt) 

Method Source Code

//package com.java2s;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

import java.nio.ShortBuffer;

public class Main {
    public static ShortBuffer newShortBuffer(int paramInt) {
        ByteBuffer localByteBuffer = newByteBuffer(paramInt * 2);
        return localByteBuffer.asShortBuffer();
    }//w  w w.j a  v a  2s  . c o  m

    public static ByteBuffer newByteBuffer(int paramInt) {
        ByteBuffer localByteBuffer = ByteBuffer.allocateDirect(paramInt);
        localByteBuffer.order(ByteOrder.nativeOrder());
        return localByteBuffer;
    }
}

Related

  1. createShortBuffer(short[] shortData)
  2. createShortIndicesBuffer( final int capacity)
  3. createShortIndicesBuffer( final int capacity, final ShortBuffer previous)
  4. newShortBuffer(int numShorts)
  5. newShortBuffer(int numShorts)
  6. makeShortBuffer(int size)
  7. makeShortBuffer(short[] arr)
  8. createDirectShortBuffer( final int capacity)
  9. createDirectShortBuffer( final int capacity, final ShortBuffer previous)