code: static ByteBuf toBase64(ByteBufAllocator allocator, ByteBuf src) {
          ByteBuf dst = Base64.encode(src, src.readerIndex(),
                  src.readableBytes(), true, Base64Dialect.STANDARD, allocator);
          src.readerIndex(src.writerIndex());
          return dst;
      }
docs: Same as {@link Base64#encode(ByteBuf, boolean)} but allows the use of a custom {@link ByteBufAllocator}.
  
  @see Base64#encode(ByteBuf, boolean)