Android ShortBuffer Create createShortBuffer(int shortCount)

Here you can find the source of createShortBuffer(int shortCount)

Description

create Short Buffer

License

Open Source License

Declaration

public static ShortBuffer createShortBuffer(int shortCount) 

Method Source Code

//package com.java2s;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

import java.nio.ShortBuffer;

public class Main {
    public static ShortBuffer createShortBuffer(int shortCount) {
        ByteBuffer data = ByteBuffer.allocateDirect(shortCount * 4);
        data.order(ByteOrder.nativeOrder());
        ShortBuffer p1 = data.asShortBuffer();
        return p1;
    }/*ww w. j a v a  2 s .  co  m*/
}

Related

  1. copy(short[] src, ShortBuffer dst, int numShorts, int offset)
  2. newShortBuffer(int numShorts)
  3. newShortBuffer(int numShorts)
  4. createShortBuffer(int capacity)
  5. createShortBuffer(int size)
  6. createShortBuffer(int size)
  7. createShortBuffer(short[] data)
  8. createShortBuffer(short[] shortData)