/** * Created by IntelliJ IDEA. * User: me * Date: 12.09.2006 * Time: 17:09:20 * To change this template use File | Settings | File Templates. */ import java.io.*; public class CountBytes { InputStream in; if (args.length == 0) in = System.in; else int total = 0; while (in.read() != -1) total++; } }