import java.io.*; public class BufferedInputStreamDemo { public static void main(String[] args) { try(FileInputStream fis = new FileInputStream("BufferedInputStreamDemo.java"); BufferedInputStream bis = new BufferedInputStream(fis); ) { int c; while((c=bis.read()) != -1) { System.out.print((char)c); } } catch(IOException ie) { ie.printStackTrace();} } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter