MUD-Dev
mailing list archive

[ Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

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



In message:  <Pine.LNX.3.96.980907143034.2414A-100000#shamen,cyberhighway.net>
             Ben Greear <greear#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




[ Other Periods  | Other mailing lists  | Search  ]