1 2 /* 3 4 The author of this software is Ian Kaplan 5 Bear Products International 6 www.bearcave.com 7 iank@bearcave.com 8 9 Copyright (c) Ian Kaplan, 1999, 2000 10 11 See copyright file for usage and licensing 12 13 */ 14 15 package jconst; 16 17 import java.io.*; 18 import util.*; 19 20 21 /* 22 * constFloat 23 * 24 */ 25 class constFloat extends constBase { 26 float f; 27 28 // Convert the integer bits into a floating point number 29 // with the same bit pattern. 30 private void toFloat( int v ) { f = Float.intBitsToFloat( v ); } 31 32 public void read( DataInputStream dStream ) { 33 int val; 34 35 val = readU4(dStream); 36 toFloat( val ); 37 } 38 39 public String getString() { 40 return Float.toString( f ); 41 } 42 43 public void pr() { 44 System.out.print( f ); 45 } // pr 46 47 } // constFloat 48 49