BufferedInputStreamDemo.java Source code

Java tutorial

Introduction

Here is the source code for BufferedInputStreamDemo.java

Source

import java.io.BufferedInputStream;
import java.io.FileInputStream;

class BufferedInputStreamDemo {

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

        BufferedInputStream bis = new BufferedInputStream(fis);

        int i;
        while ((i = bis.read()) != -1) {
            System.out.println(i);
        }

        fis.close();
    }
}