public static ByteBufferN allocate(int capacity) { if (capacity < 0) throw new IllegalArgumentException(); return new HeapByteBufferN(capacity, capacity); }