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 intThe Constant EB.static final intThe Constant GB.static final intThe Constant KB.static final ByteSizeThe Constant MAX_VALUE.static final intThe Constant MB.static final intThe Constant PB.static final intThe Constant TB.static final ByteSizeThe Constant ZERO. -
Method Summary
Modifier and TypeMethodDescriptionlongbits()Bits.booleanisZero()Checks if is zero.static ByteSizeof(long bytesCount) Of.static ByteSizeofEB(long bytes) Of EB.static ByteSizeofGB(long bytes) Of GB.static ByteSizeofKB(long bytes) Of KB.static ByteSizeofMB(long bytes) Of MB.static ByteSizeofPB(long bytes) Of PB.static ByteSizeofTB(long bytes) Of TB.static ByteSizeParses the.longsize()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
-