Interface ByteBufAllocator

    • Method Detail

      • buffer

        ByteBuf buffer()
        Allocate a ByteBuf. If it is a direct or heap buffer depends on the actual implementation.
      • buffer

        ByteBuf buffer​(int initialCapacity)
        Allocate a ByteBuf with the given initial capacity. If it is a direct or heap buffer depends on the actual implementation.
      • buffer

        ByteBuf buffer​(int initialCapacity,
                       int maxCapacity)
        Allocate a ByteBuf with the given initial capacity and the given maximal capacity. If it is a direct or heap buffer depends on the actual implementation.
      • ioBuffer

        ByteBuf ioBuffer()
        Allocate a ByteBuf, preferably a direct buffer which is suitable for I/O.
      • ioBuffer

        ByteBuf ioBuffer​(int initialCapacity)
        Allocate a ByteBuf, preferably a direct buffer which is suitable for I/O.
      • ioBuffer

        ByteBuf ioBuffer​(int initialCapacity,
                         int maxCapacity)
        Allocate a ByteBuf, preferably a direct buffer which is suitable for I/O.
      • heapBuffer

        ByteBuf heapBuffer​(int initialCapacity)
        Allocate a heap ByteBuf with the given initial capacity.
      • heapBuffer

        ByteBuf heapBuffer​(int initialCapacity,
                           int maxCapacity)
        Allocate a heap ByteBuf with the given initial capacity and the given maximal capacity.
      • directBuffer

        ByteBuf directBuffer​(int initialCapacity)
        Allocate a direct ByteBuf with the given initial capacity.
      • directBuffer

        ByteBuf directBuffer​(int initialCapacity,
                             int maxCapacity)
        Allocate a direct ByteBuf with the given initial capacity and the given maximal capacity.
      • compositeBuffer

        CompositeByteBuf compositeBuffer​(int maxNumComponents)
        Allocate a CompositeByteBuf with the given maximum number of components that can be stored in it. If it is a direct or heap buffer depends on the actual implementation.
      • compositeHeapBuffer

        CompositeByteBuf compositeHeapBuffer​(int maxNumComponents)
        Allocate a heap CompositeByteBuf with the given maximum number of components that can be stored in it.
      • compositeDirectBuffer

        CompositeByteBuf compositeDirectBuffer​(int maxNumComponents)
        Allocate a direct CompositeByteBuf with the given maximum number of components that can be stored in it.
      • isDirectBufferPooled

        boolean isDirectBufferPooled()
        Returns true if direct ByteBuf's are pooled
      • calculateNewCapacity

        int calculateNewCapacity​(int minNewCapacity,
                                 int maxCapacity)
        Calculate the new capacity of a ByteBuf that is used when a ByteBuf needs to expand by the minNewCapacity with maxCapacity as upper-bound.