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


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

Re: OutputStream.write(int)

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: OutputStream.write(int)
Date 2016-06-05 20:09 -0400
Organization Aioe.org NNTP Server
Message-ID <nj2evs$1iei$1@gioia.aioe.org> (permalink)
References <nj2ajp$4h$1@Gaia.teknon.de>

Show all headers | View raw


On 6/5/2016 6:54 PM, Volker Borchert wrote:
> The javadoc as of 1.8 states: "The 24 high-order bits of b are ignored."
> Are they really? I.o.w., has anybody encountered broken implementations
> that don't, and where?

Well an OutputStream is byte centric, so I would expect it to ignore
the high part.

If one need to truly output binary int, then one need to use
DataOutputStream (or NIO).

Arne

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


Thread

OutputStream.write(int) v_borchert@despammed.com (Volker Borchert) - 2016-06-05 22:54 +0000
  Re: OutputStream.write(int) Jan Burse <janburse@fastmail.fm> - 2016-06-06 01:45 +0200
    Re: OutputStream.write(int) v_borchert@despammed.com (Volker Borchert) - 2016-06-06 03:19 +0000
      Re: OutputStream.write(int) Jan Burse <janburse@fastmail.fm> - 2016-06-06 11:58 +0200
        Re: OutputStream.write(int) v_borchert@despammed.com (Volker Borchert) - 2016-06-06 15:51 +0000
  Re: OutputStream.write(int) Arne Vajhøj <arne@vajhoej.dk> - 2016-06-05 20:09 -0400
  Re: OutputStream.write(int) Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2016-06-05 19:38 -0700

csiph-web