# Uses of Enum Class
org.springframework.util.unit.DataUnit

Packages that use DataUnit
Package
Description
org.springframework.util.unit
Useful unit data types.

## Uses of DataUnit in org.springframework.util.unit

Methods in org.springframework.util.unit that return DataUnit
Modifier and Type
Method
Description
`static DataUnit`
DataUnit.`fromSuffix(String suffix)`
Return the `DataUnit` matching the specified `suffix`.
`static DataUnit`
DataUnit.`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DataUnit[]`
DataUnit.`values()`
Returns an array containing the constants of this enum class, in the order they are declared.
Methods in org.springframework.util.unit with parameters of type DataUnit
Modifier and Type
Method
Description
`static DataSize`
DataSize.`of(long amount, DataUnit unit)`
Obtain a `DataSize` representing an amount in the specified `DataUnit`.
`static DataSize`
DataSize.`parse(CharSequence text, DataUnit defaultUnit)`
Obtain a `DataSize` from a text string such as `"5MB"` using the specified default `DataUnit` if no unit is specified.