code: private static ByteBuf append(ByteBufAllocator allocator, boolean useDirect,
              PemEncoded encoded, int count, ByteBuf pem) {
  
          ByteBuf content = encoded.content();
  
          if (pem == null) {
              // see the other append() method
              pem = newBuffer(allocator, useDirect, content.readableBytes() * count);
          }
  
          pem.writeBytes(content.slice());
          return pem;
      }
docs: Appends the {@link PemEncoded} value to the {@link ByteBuf} (last arg) and returns it.
  If the {@link ByteBuf} didn't exist yet it'll create it using the {@link ByteBufAllocator}.