On Thu, 12 Aug 2021 21:07:53 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> Please consider this request to add an override 
>> `java.io.FileInputStream.transferTo(OutputStream)` with improved performance 
>> if the parameter is a `FileOutputStream`.
>
> Brian Burkhalter has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8272297: Set source position after FC.transferTo(); add test

src/java.base/share/classes/java/io/FileInputStream.java line 377:

> 375:             }
> 376:         }
> 377:         return super.transferTo(out);

I think there is also another bug here for the case that transferTo does a 
partial transfer, it should be:
  return transferred + super.transferTo(out));

-------------

PR: https://git.openjdk.java.net/jdk/pull/5097

Reply via email to