public static ShortBuffer createShortBuffer(short... data) {
        if (data == null) {
            return null;
        }
        ShortBuffer buff = createShortBuffer(data.length);
        buff.clear();
        buff.put(data);
        buff.flip();
        return buff;
    }
Create a new ShortBuffer of an appropriate size to hold the specified
number of shorts only if the given buffer if not already the right size.

@param buf
           the buffer to first check and rewind
@param size
           number of shorts that need to be held by the newly created
           buffer
@return the requested new ShortBuffer
jme3-core/src/main/java/com/jme3/util/BufferUtils.java