Question: Suppose that you have a binary file that contains numbers whose type is either int or double. You dont know the order of the numbers
Suppose that you have a binary file that contains numbers whose type is either int or double. You don’t know the order of the numbers in the file, but their order is recorded in a string at the beginning of the file. The string is composed of the letters i (for int) and d (for double) in the order of the types of the subsequent numbers. The string is written using the method writeUTF.
For example, the string "iddiiddd" indicates that the file contains eight values, as follows: one integer, followed by two doubles, followed by two integers, followed by three doubles. Read this binary file and create a new text file of the values, written one to a line.
Step by Step Solution
3.32 Rating (158 Votes )
There are 3 Steps involved in it
public class UTFBinaryFileReader param args the comman... View full answer
Get step-by-step solutions from verified subject matter experts
