transparent
// Byte stream import java.io.*; class TailleOctet { public static void main(String[] st) throws IOException{ InputStream in; int s=0; if(st.length == 0) in = System.in; else in = new FileInputStream(st[0]); while(in.read() != -1) s++; System.out.println(st[0]+":"+s+" octets"); } }
transparent
// Byte stream import java.io.*; class Copie{ public static void main(String[] st) throws IOException{ InputStream in; OutputStream out; int c; if(st.length == 0){ in = System.in; out =System.out; } else{ in = new FileInputStream(st[0]); if(st.length == 1) out = System.out; else out = new FileOutputStream(st[1]); } while((c=in.read()) != -1) out.write(c); } }