kwin commented on code in PR #1752:
URL: https://github.com/apache/maven-resolver/pull/1752#discussion_r2699684146


##########
maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PutTask.java:
##########
@@ -54,14 +58,33 @@ public PutTask(URI location) {
      *
      * @return The input stream for the data, never {@code null}. The stream 
is unbuffered.
      * @throws IOException If the stream could not be opened.
+     * @deprecated Use {@link #newByteChannel()} instead.
      */
+    @Deprecated
     public InputStream newInputStream() throws IOException {
         if (dataPath != null) {
             return Files.newInputStream(dataPath);
         }
         return new ByteArrayInputStream(dataBytes);
     }
 
+    /**
+     * Opens a seekable byte channel for the data to be uploaded. The length 
of the channel can be queried via
+     * {@link #getDataLength()}. It's the responsibility of the caller to 
close the provided channel.
+     * Write operations on the returned channel will throw {@link 
java.nio.channels.NonWritableChannelException}.
+     *
+     * @return The seekable byte channel for the data, never {@code null}.
+     * @throws IOException If the channel could not be opened.
+     * @since 2.1.0
+     * @see #getInputStream()
+     */
+    public SeekableByteChannel newByteChannel() throws IOException {

Review Comment:
   ok, since my use case for having that is gone, I am fine with not merging 
this right now.



-- 
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]

Reply via email to