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


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

Re: OutputStream.write(int)

From Kevin McMurtrie <mcmurtrie@pixelmemory.us>
Newsgroups comp.lang.java.programmer
Subject Re: OutputStream.write(int)
References <nj2ajp$4h$1@Gaia.teknon.de>
Date 2016-06-05 19:38 -0700
Message-ID <mcmurtrie-D93260.19382505062016@news.sonic.net> (permalink)
Organization Sonic.Net

Show all headers | View raw


In article <nj2ajp$4h$1@Gaia.teknon.de>,
 v_borchert@despammed.com (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?
> 
> 	vb

Nope.  It must eventually become a byte so it would be difficult to not 
truncate the bits.

Accidentally converting a byte to int with sign extension while reading 
is more common.

-- 
I will not see posts from astraweb, theremailer, dizum, or google
because they host Usenet flooders.

Back to comp.lang.java.programmer | Previous | Next — Previous 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