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
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
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.
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
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
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
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
<>
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
> > 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
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
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
> 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
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
> > 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
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.
--
¤--
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
>
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
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
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
> 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
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
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
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!
===
¤
23 matches
Mail list logo