public HttpData toHttpData(DataBuffer dataBuffer) {
        if (dataBuffer instanceof NettyDataBuffer) {
            return HttpData.wrap(((NettyDataBuffer) dataBuffer).getNativeBuffer());
        }
        final ByteBuffer buf =
                dataBuffer instanceof DefaultDataBuffer ? ((DefaultDataBuffer) dataBuffer).getNativeBuffer()
                                                        : dataBuffer.asByteBuffer();
        return HttpData.wrap(Unpooled.wrappedBuffer(buf));
    }
Converts a {@link DataBuffer} into an {@link HttpData}.
spring/spring6/src/main/java/com/linecorp/armeria/spring/internal/common/DataBufferFactoryWrapper.java