InputStream close()?
Bradley Smith
digitalmars-com at baysmith.com
Fri Jun 16 08:32:30 PDT 2006
Ben Hinkle wrote:
> "Bradley Smith" <digitalmars-com at baysmith.com> wrote in message
> news:e6stsf$31he$1 at digitaldaemon.com...
>> Is there some reason why the InputStream interface does not have a close()
>> method?
>>
>> Thanks,
>> Bradley
>
> I vaguely recalling poking around with adding one but it would conflict with
> OutputStream's close(). Creating a Closeable interface - this is where I
> can't remember the details - ended up requiring all Stream classes to be
> declared as Closeable. Or something like that. It's worth giving it another
> shot for sure.
>
>
You can't have two interfaces with the same method? I haven't tried it
yet, but since both InputStream and OutputStream are both interfaces, I
assumed that it would not cause a conflict.
How does one design complex systems if interfaces conflict so easily?
Thanks,
Bradley
More information about the Digitalmars-d-learn
mailing list