final int uploadKBPerSec = (int)((uploadBytes.length / 1024.0) / (uploadElapsed / 1000.0));
printPerf( "Upload bandwidth (" + uploadBytes.length + " bytes): " + uploadKBPerSec + "kb/sec" );
// test download bandwidth
final long downloadStart = now();
final byte[] downloadedBytes = sample.downloadBytes( 256 * K );
final long downloadElapsed = now() - downloadStart;
final int downloadKBPerSec = (int)((downloadedBytes.length / 1024.0) / (downloadElapsed / 1000.0));
printPerf( "Download bandwidth (" + uploadBytes.length + " bytes): " + downloadKBPerSec + "kb/sec\n" );
}