new BufferedInputStream(FileInputStream fileInputStream) : BufferedInputStream « java.io « Java by API






new BufferedInputStream(FileInputStream fileInputStream)

 
/*
 * Output:

 */

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

public class MainClass {

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

      BufferedInputStream bis = new BufferedInputStream(fis);

      int i;
      while ((i = bis.read()) != -1) {
        System.out.println(i);
      }
      fis.close();
    } catch (Exception e) {
      System.out.println("Exception: " + e);
    }
  }
}
           
         
  








Related examples in the same category

1.BufferedInputStream: available()
2.BufferedInputStream: close()
3.BufferedInputStream: read()
4.BufferedInputStream: read(byte[] b)