[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

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

[Full Header] [Plain Text]
From: "T. Alexander Popiel" <popiel@snugharbor.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 07 Sep 1998 15:43:41 -0600
References: [1]
Organization: Kanga.Nu
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