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

writeDouble() public method

Writes the IEEE double value v (i.e., 64 bits) to the output. Prior to writing, the output should be realigned at the byte level.
If an I/O error ocurred. /// ///
public writeDouble ( double v ) : void
v double The value to write to the output /// ///
return void
        public override void writeDouble(double v)
        {
            //byte[] doublebytes = BitConverter.GetBytes(v);
            //for (int i = doublebytes.Length-1; i >= 0 ; i--) write(doublebytes[i]);

            //UPGRADE_ISSUE: Method 'java.lang.Double.doubleToLongBits' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangDoubledoubleToLongBits_double'"
            //long longV = Double.doubleToLongBits(v);
            long longV = BitConverter.ToInt64(BitConverter.GetBytes(v), 0);
            write((int) (SupportClass.URShift(longV, 56)));
            write((int) (SupportClass.URShift(longV, 48)));
            write((int) (SupportClass.URShift(longV, 40)));
            write((int) (SupportClass.URShift(longV, 32)));
            write((int) (SupportClass.URShift(longV, 24)));
            write((int) (SupportClass.URShift(longV, 16)));
            write((int) (SupportClass.URShift(longV, 8)));
            write((int) (longV));
        }