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

writeFloat() public method

Writes the IEEE float value v (i.e., 32 bits) to the output. Prior to writing, the output should be realigned at the byte level.
If an I/O error ocurred. /// ///
public writeFloat ( float v ) : void
v float The value to write to the output /// ///
return void
        public override void writeFloat(float v)
        {
            // CONVERSION PROBLEM? OPTIMIZE!!!
            //byte[] floatbytes = BitConverter.GetBytes(v);
            //for (int i = floatbytes.Length-1; i >= 0 ; i--) write(floatbytes[i]);

            //UPGRADE_ISSUE: Method 'java.lang.Float.floatToIntBits' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangFloatfloatToIntBits_float'"
            //int intV = Float.floatToIntBits(v);
            int intV = BitConverter.ToInt32(BitConverter.GetBytes(v), 0);
            write(SupportClass.URShift(intV, 24));
            write(SupportClass.URShift(intV, 16));
            write(SupportClass.URShift(intV, 8));
            write(intV);
        }