Create BufferedInputStream from FileInputStream
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(); } }