In text file we use below to check EOF.
VB Code:
InputStreamReader os = new InputStreamReader(.........); int ch; while((ch=os.read()) != -1){ //Check whether EOF or not //Output Something }
But in binary file i don't how to check EOF
VB Code:
DataInputStream os = new DataInputStream(.........); System.out.println(os.readInt()); System.out.println(os.readFloat());
I don't how used loop to print content of file until EOF. Please tell me.


Reply With Quote