CSJ2K.j2k.io.BEBufferedRandomAccessFile.readFloat C# (CSharp) Method

readFloat() public method

Reads an IEEE single precision (i.e., 32 bit) floating-point number from the input. Prior to reading, the input should be realigned at the byte level.
If the end-of file was reached before /// getting all the necessary data. /// /// If an I/O error ocurred. /// ///
public readFloat ( ) : float
return float
        public override float readFloat()
        {
            // CONVERSION PROBLEM?  OPTIMIZE!!!
            //byte[] floatbytes = new byte[4];
            //for (int i = floatbytes.Length-1; i >= 0 ; i--) floatbytes[i] = (byte)read();
            //return BitConverter.ToSingle(floatbytes, 0);

            //UPGRADE_ISSUE: Method 'java.lang.Float.intBitsToFloat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangFloatintBitsToFloat_int'"
            //return Float.intBitsToFloat((read() << 24) | (read() << 16) | (read() << 8) | (read()));
            return BitConverter.ToSingle(BitConverter.GetBytes((read() << 24) | (read() << 16) | (read() << 8) | (read())), 0);
        }