Article View: borland.public.jbuilder.java.language
Article #16204Re: Byte swapping
From: Doug Bath
Date: Wed, 17 Mar 1999 00:00
Date: Wed, 17 Mar 1999 00:00
22 lines
1449 bytes
1449 bytes
Chris Hill wrote: > For floats you should probably read the number as an int, use your > existing integer byte swap routine (assuming the bytes need to be > swapped in the same way), then call Float.intBitsToFloat (if your > float is stored in the format that Java uses after the byte swap). Thanks Chris Thats exactly what I did and it works fine. I use the same method to pass floats as ints to my routine to convert from IBM to IEEE float. The same routine I use in C++ worked flawlessly. When I first started using java I looked at the syntax and said "piece of cake, It looks just like C++". I am now realizing how rich and complex a language it is. The more I learn the more impressed I am. Again thanks for all your help. Doug Bath
Technical Details
Message-ID:
<36F01D97.E9E21F4D@agt.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36EE8AA3.3212A98D@agt.net> <36eeb7cc.66297370@forums.borland.com> <36EEE3CA.F6F4D6A3@agt.net> <36eef8d9.82950857@forums.borland.com> <36EFE515.ECA654BB@agt.net> <36eff869.148375332@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a228e969071f0feb X-Google-Attributes: gidf74b3,public From: Doug Bath <dbath@agt.net> Subject: Re: Byte swapping Date: 1999/03/17 Message-ID: <36F01D97.E9E21F4D@agt.net> X-Deja-AN: 455872072 Content-Transfer-Encoding: 7bit References: <36EE8AA3.3212A98D@agt.net> <36eeb7cc.66297370@forums.borland.com> <36EEE3CA.F6F4D6A3@agt.net> <36eef8d9.82950857@forums.borland.com> <36EFE515.ECA654BB@agt.net> <36eff869.148375332@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language