-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: core-libs
A new static `ofFileChannel(FileChannel channel, long offset, long length)` method has been added to `java.net.HttpRequest.BodyPublishers`. This method provides an `HttpClient` request body publisher to upload a certain region of a file. The new publisher does not modify the state of the passed `FileChannel`, streams the file channel bytes as it publishes (i.e., avoids reading the entire file into the memory), and can be leveraged to implement sliced uploads.