Re: little endian & big endian

1999-02-05 Thread Gerald Gutierrez
As mentioned below, class files are MSB. That is defined in the Java specification. For serialized objects, one only has to look at the serialization source code. The specification also indicates that a VM's internal representation is implementation dependent. The common sense of most people who

Re: little endian & big endian

1999-02-04 Thread Peter Naulls
Brad Pepers <[EMAIL PROTECTED]> wrote: > Timothy Murphy wrote: > > > > Couldn't one write an int to a file, > > and then read it as a character array? > > [Just a slightly random thought.] > > I would imagine that if Java is done right the file format the > int will be written in will be speci

Re: little endian & big endian

1999-02-03 Thread John Summerfield
On Wed, 3 Feb 1999, Carlo E. Prelz wroteSee added comments to code: > Subject: Re: little endian & big endian > Date: Tue, Feb 02, 1999 at 06:00:22PM -0800 > > Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): > > > > I now have two different opinions.

Re: little endian & big endian

1999-02-03 Thread Robert P. Biuk-Aghai
On Wed, 3 Feb 1999, Brad Pepers wrote: > If I wasn't lazy it should be fairly easy to find somewhere in > the Java specs that tells you what endian is used for the data > written out. Okay, I did a grep on the VMSpec docs and found out: Section 1.8: The Java Instruction Set "The number and si

Re: little endian & big endian

1999-02-03 Thread Brad Pepers
Timothy Murphy wrote: > > On Tue, Feb 02, 1999 at 06:00:22PM -0800, [EMAIL PROTECTED] wrote: > > > Class files and serialized objects are MSB. The endianness of the VM > > itself is implementation dependent; however, if you could devise a > > pure-Java program that could detect the endianness o

Re: little endian & big endian

1999-02-03 Thread David Harvill
Absolutely. -dave On Wed, 3 Feb 1999, Timothy Murphy wrote: > Couldn't one write an int to a file, > and then read it as a character array? > [Just a slightly random thought.] > > -- > Timothy Murphy > e-mail: [EMAIL PROTECTED] > tel: +353-1-2842366 > s-mail: School of Mathematics, Trinity

Re: little endian & big endian

1999-02-03 Thread Timothy Murphy
On Tue, Feb 02, 1999 at 06:00:22PM -0800, [EMAIL PROTECTED] wrote: > Class files and serialized objects are MSB. The endianness of the VM > itself is implementation dependent; however, if you could devise a > pure-Java program that could detect the endianness of the VM, you > would have found a

Re: little endian & big endian

1999-02-03 Thread Christopher Hinds
<> You are looking in the *wrong* place , try these two excellent books on the Java Virtual machines, 1.) "The Java Virtual Machine by Jon Meyer and Troy Downing (Publisher O'Reilly)" 2.) "Inside the Java Virtual Machine by Bill Venners ( publisher McGraw - Hill ) This book is my favorit

Re: little endian & big endian

1999-02-03 Thread Peter Naulls
> > 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 > fi

Re: little endian & big endian

1999-02-03 Thread Carlo E. Prelz
Subject: Re: little endian & big endian Date: Wed, Feb 03, 1999 at 08:48:11AM +0200 Quoting Carlo E. Prelz ([EMAIL PROTECTED]): > Wed Feb 3 07:45:55 eccolo:~/test <^_^> java Test_endian > First byte: a > Second byte: b > Wed Feb 3 07:46:22 eccol

Re: little endian & big endian

1999-02-03 Thread Carlo E. Prelz
Subject: Re: little endian & big endian Date: Tue, Feb 02, 1999 at 06:00:22PM -0800 Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): > > I now have two different opinions. Some say Java is big-endian, some > > say it depends which machine it's on. Who&#x

Re: little endian & big endian

1999-02-02 Thread mlorton
> 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. Class files and serialized objects are MSB. The endianness of the VM itself is implementation dependent; however, if you could devise a pure-Java program th

Re: little endian & big endian

1999-02-02 Thread Robert P. Biuk-Aghai
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 > > referre

Re: little endian & big endian

1999-02-02 Thread Peter Naulls
> > I would like to ask about a question. I am doing a JAVA program > > which should deal with system architeucture. I would like to ask a > > question how can I know the system is little endian or big endian? > > Don't know if this helps, but I read in the Java Glossary > (http://mindprod

Re: little endian & big endian

1999-02-01 Thread Aaron Gaudio
And lo, the chronicles report that Leung Yau Wai spake thusly unto the masses: > > so... I would like like to check it out using JAVA! > It can't be done, so you *have* to do it using native code (JNI). Sorry, but that's the way it is. -- ¤--

Re: little endian & big endian

1999-02-01 Thread Leung Yau Wai
On Mon, 1 Feb 1999, Urban Widmark wrote: > You could let the JNI part of your program try to detect endianness: > char tmp[2]; > short *s = (short *) tmp; > tmp[0] = 0xaa; > tmp[1] = 0xbb; > if(s == 0xbbaa) > ; /* little, x86 etc */ > else >

Re: little endian & big endian

1999-02-01 Thread Urban Widmark
On Sun, 31 Jan 1999, Leung Yau Wai wrote: > On Sat, 30 Jan 1999, Aaron Gaudio wrote: > > Many people will feel I very strange since I would like to know > the system endianess. Since I am working JNI so I need to concern about > it. So, I think I can determine it from the System property

Re: little endian & big endian

1999-01-31 Thread Robert P. Biuk-Aghai
On Sun, 31 Jan 1999, Leung Yau Wai wrote: > Dear all, > > I would like to ask about a question. I am doing a JAVA program > which should deal with system architeucture. I would like to ask a > question how can I know the system is little endian or big endian? Don't know if this helps, b

Re: little endian & big endian

1999-01-31 Thread Aaron Gaudio
And lo, the chronicles report that Leung Yau Wai spake thusly unto the masses: > > On Sat, 30 Jan 1999, Aaron Gaudio wrote: > > > You won't...not from java at least. How you determine endianess will be > > platform-dependant. In glibc (and possibly libc5) systems, look at > > /usr/include/endian

Re: little endian & big endian

1999-01-31 Thread SHUDO Kazuyuki
> Many people will feel I very strange since I would like to know > the system endianess. Since I am working JNI so I need to concern about > it. You can deal with endianess in native code not in Java code. I think that system dependent stuffs should not be dealt with in Java code. See th

Re: little endian & big endian

1999-01-31 Thread Leung Yau Wai
On Sat, 30 Jan 1999, Aaron Gaudio wrote: > You won't...not from java at least. How you determine endianess will be > platform-dependant. In glibc (and possibly libc5) systems, look at > /usr/include/endian.h (you'll have to have native code for this). This > will be different on other systems (fo

Re: little endian & big endian

1999-01-30 Thread Aaron Gaudio
You won't...not from java at least. How you determine endianess will be platform-dependant. In glibc (and possibly libc5) systems, look at /usr/include/endian.h (you'll have to have native code for this). This will be different on other systems (for example, Solaris). And lo, the chronicles repo

little endian & big endian

1999-01-30 Thread Leung Yau Wai
Dear all, I would like to ask about a question. I am doing a JAVA program which should deal with system architeucture. I would like to ask a question how can I know the system is little endian or big endian? Thanks! === ¤