How to read Date from VB binary-file in java -
i have file produced visual basic program wrote years ago. trying convert data can read in replacement java program wrote. having problems converting vb date 8 byte double. have read this thread. going through steps, able convert date manually (0x00000000e080e440) (12/18/2014). little endian big endian decimal = 4.1991e4, 41991 represents correct date. trying write in java. other post references code swapping , have plucked code:
/** * byte swap single double value. * * @param value value byte swap. * @return byte swapped representation. */ public static double swap (double value) { long longvalue = double.doubletolongbits (value); longvalue = swap (longvalue); return double.longbitstodouble (longvalue); }
that code not compile. learning java bear me. code looks recursively calling itself, when calls (swap) passing longvalue long when swap expecting double. missing something? how can bytes swapped little endian big?
the code not call itself. calling method swap(long longvalue)
, , method swap(double value
). doesn't compile because not have other method.