title: How I can read some specific data from a file that contain different types of data?
body: <p>I need to write some data about several companies into a binary file; the data includes name of companies (String), year of incorporation (int), and revenue this year (double). Write data would be not trouble to me, but I don't know how to read some specific data from a the binary file; for example, if I have name of a company, I need to return the the other data about the company. So far, I only know to read all the data or maybe line by line in a binary file. Can someone suggest which class or method I need to use to do so? </p>