try { ByteCount blocksizeParam = GetOpt.getOpt(args, "blocksize", ByteCount.class); final int blockSize; if(blocksizeParam==null) blockSize = BufferManager.BUFFER_SIZE; blockSize = (int)longBlockSize; final BitRate bwlimit = GetOpt.getOpt(args, "bwlimit", BitRate.class); if(bwlimit!=null && bwlimit.getBitRate()<1) throw new IllegalArgumentException("bwlimit<1: "+bwlimit); ByteCount limit = GetOpt.getOpt(args, "limit", ByteCount.class); long[] bytesRemaining; if(limit==null) bytesRemaining = null; bytesRemaining = new long[] {temp}; File output = GetOpt.getOpt(args, "output", File.class); // null for standard output Boolean progressParam = GetOpt.getOpt(args, "progress", Boolean.TYPE); boolean progress = progressParam!=null ? progressParam : false; List<String> sourcePaths = GetOpt.getArguments(args);