Thursday 15 March 2012

java - How I can read some specific data from a file that contain different types of data? -



java - How I can read some specific data from a file that contain different types of data? -

i need write info several companies binary file; info includes name of companies (string), year of incorporation (int), , revenue year (double). write info not problem me, don't know how read specific info binary file; example, if have name of company, need homecoming the other info company. far, know read info or maybe line line in binary file. can suggest class or method need utilize so?

you should read serialization/deserialization of objects in java. serialize list of companies (e.g. arraylist<company> companies) deserialize it, can utilize same list of companies 1 time again in code search through list find company want. optionally, can utilize map<string, company> jb nizet suggests.

java io

No comments:

Post a Comment