public float unpackFloat ( ) throws IOException { byte b = readByte ( ) ; switch ( b ) { case Code . FLOAT32 : // float float fv = readFloat ( ) ; return fv ; case Code . FLOAT64 : // double double dv = readDouble ( ) ; return ( float ) dv ; } throw unexpected ( "Float" , b ) ; }
Reads a float .