A String representation of a double is written to and read from a file by a C# application.
The C# application converts the double to a string using the following fragment:
value.ToString("R", NumberFormatInfo.InvariantInfo);
The C# application converts the string to a double using the following fragment
double num = double.Parse(s, NumberStyles.Float, (IFormatProvider) NumberFormatInfo.InvariantInfo);
If that same file were to be written to and read from by a Java application, how would you go about converting the types without loosing data?