[MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?

T. Alexander Popiel popiel at snugharbor.com
Mon Sep 7 15:43:41 CEST 1998


In message:  <Pine.LNX.3.96.980907143034.2414A-100000 at shamen.cyberhighway.net>
             Ben Greear <greear at cyberhighway.net> writes:
>
>On Mon, 7 Sep 1998, Ola Fosheim Grxstad wrote:
>> 
>> Does Java provide functions for converting floats to raw bytes?
>
>Yes.  Look in the Double and Float classes:
>
>This is from the JavaDocs for the JDK.
>
>Float.floatToIntBits() 

Probably more useful are the java.io.DataInput and java.io.DataOutput
interfaces, and the corresponding Data*Stream classes.

- Alex




More information about the mud-dev-archive mailing list