Thanks a lot Leyland. Ur code is very useful to us and it helped us to
proceed further.. Thanks again.
Regards,
ishwari
----- Original Message -----
From: "Leyland Needham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 8:51 PM
Subject: Re: [JAVA3D] Need of Equivalent code in Java
> The problem may be because its backwards. That is, it may be an issue of
big
> endian and little endian... I'm not sure if this will work... try
reversing
> the process and looking at the bits by using the function
> Double.doubleToLongBits...
>
> Also as a quicky you can try reversing the byte order dont know how much
> that'll help...
>
> byte arr[8];
> long bits=0;
> double db;
>
> for(i=0;i<8;i++)
> arr[i] = getbyte();
>
> for(i=7;i>=0;i++) file://reversed
> bits = (bits << 8) | arr[i];
>
> db = Double.longBitsToDouble(bits);
>
> I dont know if that will work, but its worth a quick try, if it really is
an
> endian issue you may have to do more in terms of reversing the bits of the
> individual bytes (yuck). If not, like I said try something like
>
> long bits = Double.doubleToLongBits();
>
> And then looking at the individual bytes..
>
> Leyland Needham
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".