java file IO


java file IO

import java.io.EOFException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.ObjectInputStream; public class BinaryInputDemo { public static void main(String[] args) { String fileName = "numbers.dat"; try { ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(fileName)); System.out.println("Reading the nonnegative integers"); System.out.println("in the file " + fileName); int anInteger = inputStream.readInt(); ...



원문링크 : java file IO