shark
3.0-alpha-8
jvm
shark
/
shark
/
ByteSize
Byte
Size
@
JvmInline
value
class
ByteSize
(
val
inWholeBytes
:
Long
)
:
Comparable
<
ByteSize
>
Inspired by https://github.com/saket/file-size as well as Kotlin's Duration API.
Members
Constructors
Byte
Size
Link copied to clipboard
constructor
(
inWholeBytes
:
Long
)
Functions
compare
To
Link copied to clipboard
open
operator override
fun
compareTo
(
other
:
ByteSize
)
:
Int
div
Link copied to clipboard
inline operator
fun
div
(
other
:
ByteSize
)
:
ByteSize
minus
Link copied to clipboard
inline operator
fun
minus
(
other
:
ByteSize
)
:
ByteSize
plus
Link copied to clipboard
inline operator
fun
plus
(
other
:
ByteSize
)
:
ByteSize
times
Link copied to clipboard
inline operator
fun
times
(
other
:
ByteSize
)
:
ByteSize
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String
Properties
in
Whole
Bytes
Link copied to clipboard
val
inWholeBytes
:
Long
in
Whole
Gigabytes
Link copied to clipboard
val
inWholeGigabytes
:
Long
in
Whole
Kilobytes
Link copied to clipboard
val
inWholeKilobytes
:
Long
in
Whole
Megabytes
Link copied to clipboard
val
inWholeMegabytes
:
Long