java.lang.Object
com.pervasive.datarush.commons.util.MemorySizes
-
Method Summary
Modifier and TypeMethodDescriptionstatic longparseByteSizeSpecifier(String specifier) Parses the given property as a size in bytes.
-
Method Details
-
parseByteSizeSpecifier
Parses the given property as a size in bytes. Values are supplied as number strings, supporting an optional size suffix. The common suffixes K, M, and G are supported, having the expected meaning; suffixes are case-insensitive. Omitting the suffix indicates the value is in bytes.- Parameters:
propertyName- the name of the property, used for error handlingspecifier- the specifier. for example "100M"- Returns:
- the size in bytes
- Throws:
IllegalArgumentException- if the size specifier cannot be parsed or specifies a negative size.
-