how to use reading and writing file :fileInputStream:FileOutputStream.....
Reading and Writing Files
Java provides a number of classes and methods that allow you to read and write files. In Java, all files are byte-oriented, and Java provides methods to read and write bytes from and to a file Two of the most often-used stream classes are FileInputStream and FileOutputStream, which create byte streams linked to files.