Re: FileOutputStream.available() and pipe EOF

2018-02-19 Thread Basin Ilya
>> or instead of relying on an undocumented behaviour Fine. Isn't the goal of Java to behave equally on various OSes? If there's a difference, we should adopt the best variant AND document it. And in this case it is to throw an exception on EOF. I don't know about Solaris, but on Windows it's a m

Re: FileOutputStream.available() and pipe EOF

2018-02-10 Thread Basin Ilya
Unfortunately, read() is 1) uninterruptilbe 2) Unlike sockets, close() or even Thread.stop() won't cancel a read pipe operation on Windows 11.02.2018 0:27, Remi Forax пишет: > Hi Basin, > or instead of relying on an undocumented behaviour, you can use any overloads > of read(), if it returns -1,

Re: FileOutputStream.available() and pipe EOF

2018-02-10 Thread Remi Forax
Hi Basin, or instead of relying on an undocumented behaviour, you can use any overloads of read(), if it returns -1, it's the ends of the stream. cheers, Rémi - Mail original - > De: "Basin Ilya" > À: "core-libs-dev" > Envoyé: Samedi 10 Février 2018 22:15:18 > Objet: FileOutputStream.a