Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39888

Re: Is it possible to send message bursts?

Path csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Andreas Leitgeb <avl@logic.at>
Newsgroups comp.lang.java.programmer
Subject Re: Is it possible to send message bursts?
Date Mon, 2 Jan 2023 19:13:40 -0000 (UTC)
Organization A noiseless patient Spider
Lines 23
Message-ID <slrntr6b74.pa7s.avl@logic.at> (permalink)
References <7128506e-015c-4992-8ee4-9c62fb2ccc11n@googlegroups.com> <touu1b$9tp$1@gioia.aioe.org> <slrntr6aod.pa7s.avl@logic.at>
Reply-To avl@logic.at
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Mon, 2 Jan 2023 19:13:40 -0000 (UTC)
Injection-Info reader01.eternal-september.org; posting-host="7c5113b0d3e84b34060ba25be7b43f6a"; logging-data="1958224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nR7N+0bb7QQPk0Td9K2lM"
User-Agent slrn/1.0.3 (Linux)
Cancel-Lock sha1:i7/hR+lNr9LgH8ILNms7m6hsU1c=
Xref csiph.com comp.lang.java.programmer:39888

Show key headers only | View raw


Andreas Leitgeb <avl@logic.at> wrote:
> Arne Vajhøj <arne@vajhoej.dk> wrote:
>> I don't understand. read() is a blocking method, so if there
>> is no input it blocks until there is input. It returns -1
>> if end of stream is reached (and stream is then invalid and
>> no point in calling read again).
>
> Outside of Java world, if stdin is bound to a terminal, then
> receiving an EOF and still being able to read more data till 
> next EOF is not quite as bizarre as it might look like to 
> Java'ists ;-)

Another use could be file-based Streams:
   You read a file to its end.
   Some other process appends data to the file.
   You could now (theoretically) read some more data.

I must admit, I'm not sure(*), if that would work in
Java, with its rather simple stream-abstraction,
but it surely does seem reasonable in principle.

*: and I'm too lazy to check ;-)

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is it possible to send message bursts? mike <mikaelpetterson@hotmail.com> - 2023-01-02 02:10 -0800
  Re: Is it possible to send message bursts? Arne Vajhøj <arne@vajhoej.dk> - 2023-01-02 10:42 -0500
    Re: Is it possible to send message bursts? Andreas Leitgeb <avl@logic.at> - 2023-01-02 19:05 +0000
      Re: Is it possible to send message bursts? Andreas Leitgeb <avl@logic.at> - 2023-01-02 19:13 +0000
      Re: Is it possible to send message bursts? Arne Vajhøj <arne@vajhoej.dk> - 2023-01-02 19:27 -0500
  Re: Is it possible to send message bursts? "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2023-01-03 04:07 -0800

csiph-web