Package org.nuxeo.common.utils
Class SizeUtils
java.lang.Object
org.nuxeo.common.utils.SizeUtils
Deprecated, for removal: This API element is subject to removal in a future version.
Class containing helpers related to the expression of sizes in bytes, kilobytes, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDeprecated, for removal: This API element is subject to removal in a future version.static final longDeprecated, for removal: This API element is subject to removal in a future version.static final longDeprecated, for removal: This API element is subject to removal in a future version.static final longDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic longparseSizeInBytes(String string) Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of bytes corresponding to a string expressing a size.
-
Field Details
-
KB
public static final long KBDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
MB
public static final long MBDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
GB
public static final long GBDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
TB
public static final long TBDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Method Details
-
parseSizeInBytes
Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of bytes corresponding to a string expressing a size.The suffixes KB, MB, GB, TB are recognized (in any case).
- Parameters:
string- the size as a string- Returns:
- the size
- Throws:
NumberFormatException- if the size cannot be parsed
-
ByteSizeinstead