On Tue, 2 Feb 1999, Peter Naulls wrote:
> > Don't know if this helps, but I read in the Java Glossary
> > (http://mindprod.com/gloss.html):
> >
> > "Java stores binary values internally and in files MSB (Most
> > Significant Byte) first, i.e. high order part first. This is
> > referred to as big-endian byte sex or sometimes network order."
>
> Rubbish. They're in MSB in classfiles, but internally, the JVM will
> whatever is the platform's way round, otherwise it'll have to
> convert everytime it does things like addition (and that would of
> course be slow).
>
> On a small-endian machine, the values would only be converted to
> big-endian when they're written to a file, or sent out over the network.
Actually, I was wondering whether the Java Language Spec says anything
about what byte order should prevail. I searched for it but couldn't
find anything about endianness or byte order. Then again, I didn't
read the whole darn lot.
I now have two different opinions. Some say Java is big-endian, some
say it depends which machine it's on. Who's right? Proofs, please.
Robert.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Robert P Biuk-Aghai, University of Macau, Faculty of Science and Technology
http://hyperg.sftw.umac.mo/robert/ tel: +853-3974365 fax: +853-838314
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Microsoft isn't the answer. Microsoft is the question and the answer is no.