Package | Description |
---|---|
cn.hutool.core.io.unit |
数据单位相关封装,包括DataUnit数据单位和DataSize数据大小
|
Modifier and Type | Method and Description |
---|---|
static DataUnit |
DataUnit.fromSuffix(String suffix)
通过后缀返回对应的 DataUnit
|
static DataUnit |
DataUnit.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DataUnit[] |
DataUnit.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static DataSize |
DataSize.of(BigDecimal amount,
DataUnit unit)
获得指定
DataUnit 对应的DataSize |
static DataSize |
DataSize.of(long amount,
DataUnit unit)
获得指定
DataUnit 对应的DataSize |
static DataSize |
DataSize.parse(CharSequence text,
DataUnit defaultUnit)
Obtain a DataSize from a text string such as
12MB using
the specified default DataUnit if no unit is specified. |
Copyright © 2024. All rights reserved.