feat(graphics): update BufferUtils
@@ -11,35 +11,35 @@ public final class BufferUtils {
return ByteBuffer.allocateDirect(capacity).order(ByteOrder.nativeOrder());
}
- public static ByteBuffer wrapAsByteBuffer(byte[] src) {
+ public static ByteBuffer wrapAsByteBuffer(byte... src) {
return createByteBuffer(src.length).put(src).flip();
}
- public static ByteBuffer wrapAsByteBuffer(short[] src) {
+ public static ByteBuffer wrapAsByteBuffer(short... src) {
ByteBuffer byteBuffer = createByteBuffer(src.length << 1);
byteBuffer.asShortBuffer().put(src).flip();
return byteBuffer;
}
- public static ByteBuffer wrapAsByteBuffer(int[] src) {
+ public static ByteBuffer wrapAsByteBuffer(int... src) {
ByteBuffer byteBuffer = createByteBuffer(src.length << 2);
byteBuffer.asIntBuffer().put(src).flip();
return byteBuffer;
}
- public static ByteBuffer wrapAsByteBuffer(long[] src) {
+ public static ByteBuffer wrapAsByteBuffer(long... src) {
ByteBuffer byteBuffer = createByteBuffer(src.length << 3);
byteBuffer.asLongBuffer().put(src).flip();
return byteBuffer;
}
- public static ByteBuffer wrapAsByteBuffer(float[] src) {
+ public static ByteBuffer wrapAsByteBuffer(float... src) {
ByteBuffer byteBuffer = createByteBuffer(src.length << 2);
byteBuffer.asFloatBuffer().put(src).flip();
return byteBuffer;
}
- public static ByteBuffer wrapAsByteBuffer(double[] src) {
+ public static ByteBuffer wrapAsByteBuffer(double... src) {
ByteBuffer byteBuffer = createByteBuffer(src.length << 3);
byteBuffer.asDoubleBuffer().put(src).flip();
return byteBuffer;
