private fun convertByte(byte: Long) : String {
var retFormat = ""
val size: Double = byte.toDouble()
val s = arrayOf("bytes", "KB", "MB", "GB", "TB", "PB")
val idx = Math.floor(Math.log(size) / Math.log(1024.0)).toInt()
val df = DecimalFormat("#,###.##")
val ret = size / Math.pow(1024.0, Math.floor(idx.toDouble()))
retFormat = df.format(ret) + " " + s[idx]
return retFormat
}