Unpooled.buffer

Creates a new big-endian heap buffer with the specified {@code capacity}, which expands its capacity boundlessly on demand. The new buffer's {@code readerIndex} and {@code writerIndex} are {@code 0}.

  1. ByteBuf buffer()
  2. ByteBuf buffer(size_t initialCapacity)
    class Unpooled
    static
    buffer
  3. ByteBuf buffer(int initialCapacity, int maxCapacity)

Meta