@UnstableApi
    static HttpData wrap(ByteBuf buf) {
        requireNonNull(buf, "buf");
        final int length = buf.readableBytes();
        if (length == 0) {
            buf.release();
            return empty();
        }

        final HttpData data = new ByteBufHttpData(buf, true);
        buf.touch(data);
        return data;
    }
(Advanced users only) Converts the specified Netty {@link ByteBuf} into a pooled {@link HttpData}.
The buffer is not copied; any changes made to it will be visible to {@link HttpData}. The ownership of
the buffer is transferred to the {@link HttpData}. If you still need to use it after calling this method,
make sure to call {@link ByteBuf#retain()} first.

@return a new {@link HttpData}. {@link #empty()} if the readable bytes of {@code buf} is 0.

@see PooledObjects
core/src/main/java/com/linecorp/armeria/common/HttpData.java