Datasets:

ArXiv:
License:
File size: 402 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.io.FileInputStream;

public class FileInputStreamExample2 {
    public static void main(String args[]) {
        try (FileInputStream fin = new FileInputStream("testout2.txt")) {
            int i = 0;
            while ((i = fin.read()) != -1) {
                System.out.print((char) i);
            }
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}