FileInputStreamDemo.java Source code

Java tutorial

Introduction

Here is the source code for FileInputStreamDemo.java

Source

import java.io.FileInputStream;

class FileInputStreamDemo {

    public static void main(String args[]) throws Exception {
        FileInputStream fis = new FileInputStream(args[0]);

        // Read and display data
        int i;
        while ((i = fis.read()) != -1) {
            System.out.println(i);
        }

        fis.close();

    }
}