Here you can find the source of bytesPerSecond(long totalByteCount, long elapsed)
static long bytesPerSecond(long totalByteCount, long elapsed)
//package com.java2s; public class Main { static final int MILLIS = 1000; static long bytesPerSecond(long totalByteCount, long elapsed) { return (long) (((double) totalByteCount / (double) elapsed) * MILLIS); }/*from ww w . ja va 2 s .co m*/ }