allocate static method

ByteBuffer allocate(
  1. int capacity
)

Creates a new ByteBuffer with the given capacity

Implementation

static ByteBuffer allocate(int capacity) {
  return ByteBuffer._internal(capacity);
}