JByteBuffer.allocateDirect constructor

JByteBuffer.allocateDirect(
  1. int capacity
)

Allocates a new direct byte buffer.

Throws:

  • IllegalArgumentException - If the capacity is a negative integer

Implementation

factory JByteBuffer.allocateDirect(int capacity) {
  return _allocateDirectId(
      _class, const JByteBufferType(), [JValueInt(capacity)]);
}