Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: v_borchert@despammed.com (Volker Borchert) Newsgroups: comp.lang.java.programmer Subject: Re: OutputStream.write(int) Date: 6 Jun 2016 15:51:44 GMT Organization: Private site at Eddersheim, Germany Lines: 19 Distribution: world Message-ID: References: X-Trace: individual.net qqoV8Z+Vs6s6ttD9fznkhwYZ0AGnPsXLOaRESJSuHlMRfT8yN3 Cancel-Lock: sha1:3NMxYDlRxVG4WyTDH9eMat5mjcc= Xref: csiph.com comp.lang.java.programmer:34498 Jan Burse wrote: > Volker Borchert schrieb: > > I can see 0x000000, but not 0xffffff. And I'd be more suspicious > > about <0 vs. >=0 than about intermediate bits. > > byte is a signed data type. if you accesse a byte array > element you get an int value in the range -128 to 127. > The statement in write(byte[],..) where this happens is this: > > write(b[off + i]); Ich werde hundertmal schreiben: Nicht vor dem Aufwachen posten. vb -- "I'm a doctor, not a mechanic." Dr Leonard McCoy "I'm a mechanic, not a doctor." Volker Borchert