Would it make sense to add a new constructor to java.io.SequenceInputStream?
David Alayachew
davidalayachew at gmail.com
Fri Oct 18 02:53:07 UTC 2024
I very much like this. I didn't even know about the SequenceInputStream
until a few days ago, so this would have way more visibility. And then it
could just delegate to SequenceInputStream under the hood. I like it a lot.
It looks like Jaikiran gave me a task to go search up other libraries and
see where and how SequenceInputStream is being used. I will start that next
week and respond onto this thread with my findings. This is my first time
doing this, so any suggestions on strategies would be appreciated.
On Thu, Oct 17, 2024, 9:57 AM Alan Bateman <alan.bateman at oracle.com> wrote:
>
>
> On 17/10/2024 04:47, David Alayachew wrote:
> > Hello Core Libs Dev Team,
> >
> > Currently, java.io.SequenceInputStream only has 2 constructors -- one
> > that takes in 2 instances of InputStream, and another that takes in an
> > Enumeration of type InputStream.
> >
> > Would it make sense to add a third constructor that takes in multiple
> > instances of InputStream? I don't know if a list, an array, varargs,
> > etc makes more sense. But I would think a 3rd constructor would
> > improve this API.
>
> If you are exploring this topic then put InputStream.of(InputStream...
> sources) on the list to try out. InputStream.of() could work the
> equivalent of InputStream.nulInputStream().
>
> -Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20241017/88620117/attachment.htm>
More information about the core-libs-dev
mailing list