Class ByteSize
java.lang.Object
ecmwf.common.technical.ByteSize
ECMWF Product Data Store (OpenECPDS) Project.
- Since:
- 2024-07-01
- Version:
- 6.7.7
- Author:
- Laurent Gougeon - syi@ecmwf.int, ECMWF.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The Constant EB.static final int
The Constant GB.static final int
The Constant KB.static final ByteSize
The Constant MAX_VALUE.static final int
The Constant MB.static final int
The Constant PB.static final int
The Constant TB.static final ByteSize
The Constant ZERO. -
Method Summary
Modifier and TypeMethodDescriptionlong
bits()
Bits.boolean
isZero()
Checks if is zero.static ByteSize
of
(long bytesCount) Of.static ByteSize
ofEB
(long bytes) Of EB.static ByteSize
ofGB
(long bytes) Of GB.static ByteSize
ofKB
(long bytes) Of KB.static ByteSize
ofMB
(long bytes) Of MB.static ByteSize
ofPB
(long bytes) Of PB.static ByteSize
ofTB
(long bytes) Of TB.static ByteSize
Parses the.long
size()
Size.toString()
To string.
-
Field Details
-
ZERO
The Constant ZERO. -
MAX_VALUE
The Constant MAX_VALUE. -
KB
public static final int KBThe Constant KB.- See Also:
-
MB
public static final int MBThe Constant MB.- See Also:
-
GB
public static final int GBThe Constant GB.- See Also:
-
TB
public static final int TBThe Constant TB.- See Also:
-
PB
public static final int PBThe Constant PB.- See Also:
-
EB
public static final int EBThe Constant EB.- See Also:
-
-
Method Details
-
ofKB
-
ofMB
-
ofGB
-
ofTB
-
ofPB
-
ofEB
-
size
public long size()Size.- Returns:
- the long
-
bits
public long bits()Bits.- Returns:
- the long
-
of
Of.- Parameters:
bytesCount
- the bytes count- Returns:
- the byte size
-
parse
-
isZero
public boolean isZero()Checks if is zero.- Returns:
- true, if is zero
-
toString
-