RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Jun 18 17:30:49 UTC 2021
On Jun 18, 2021, at 6:36 AM, Alan Bateman <alanb at openjdk.java.net<mailto:alanb at openjdk.java.net>> wrote:
Adding an override of transferTo may require new tests. @bplb Do you if we have good tests for all the scenarios where input stream returned by Channels.newInputStream is the source?
There are not a lot of tests for the `InputStream` returned by `Channels.newInputStream`:
`java/nio/channels/Channels`:
`Basic.java` - reading from a wrapped `FileChannel`
`ReadByte.java` - trivial
`Basic2.java` - reading at random offsets from a wrapped `AsynchronousSocketChannel`
`ReadOffset.java` - trivial
Elsewhere:
`sun/nio/ch/TempBuffer.java`
`jdk/nio/zipfs/ZipFSTester.java`
I don’t see that `transferTo()` on such a stream is tested anywhere.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20210618/7d0770e9/attachment.htm>
More information about the nio-dev
mailing list