garydgregory commented on a change in pull request #302:
URL: 
https://github.com/apache/httpcomponents-core/pull/302#discussion_r728074569



##########
File path: 
httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/AsyncEntityProducers.java
##########
@@ -218,6 +221,20 @@ public static AsyncEntityProducer create(final File 
content, final ContentType c
         return withTrailers(create(content, contentType), trailers);
     }
 
+    /**
+     * @since 5.2
+     */
+    public static AsyncEntityProducer create(final Path content, final 
ContentType contentType, final Header... trailers) throws IOException {
+        return withTrailers(new PathEntityProducer(content, contentType, 
StandardOpenOption.READ), trailers);
+    }
+
+    /**
+     * @since 5.2
+     */
+    public static AsyncEntityProducer create(final Path content, final 
ContentType contentType, final OpenOption... options) throws IOException {

Review comment:
       FTR: Note that Java comes with three baked-in NIO file providers: File, 
Zip, and Jar.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to