static HttpData copyOf(ByteBuf data) {
        requireNonNull(data, "data");

        data.touch(data);

        if (!data.isReadable()) {
            return empty();
        }

        return wrap(ByteBufUtil.getBytes(data));
    }
Creates a new instance from the specified {@link ByteBuf} by first copying its content. The reference
count of {@link ByteBuf} will not be changed.

@return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.
core/src/main/java/com/linecorp/armeria/common/HttpData.java