Here you can find the source of newShortBuffer(int paramInt)
public static ShortBuffer newShortBuffer(int paramInt)
//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; } }