RFR: 8329829: HttpClient: Add a BodyPublishers.ofFileChannel method [v2]
Volkan Yazici
vyazici at openjdk.org
Mon Jul 7 09:32:34 UTC 2025
On Mon, 7 Jul 2025 08:31:10 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> src/java.net.http/share/classes/java/net/http/HttpRequest.java line 739:
>>
>>> 737: * @param channel a file channel
>>> 738: * @param offset the offset of the first byte
>>> 739: * @param length the number of bytes to use
>>
>> I'd suggest to say something like:
>>> the number of bytes to send
>>
>> or
>>> the number of bytes to read from the file channel
>
> It might be also useful to specify what happens if length is zero or negative. Either here or in the `@throws` below if an exception is going to be thrown.
1. Improved the wording as suggested in 0eda56f18a2
2. There is already a `@throws IndexOutOfBoundsException` warning against invalid bounds specification
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26155#discussion_r2189486769
More information about the net-dev
mailing list