Package org.icij.datashare
Class HumanReadableSize
- java.lang.Object
-
- org.icij.datashare.HumanReadableSize
-
public class HumanReadableSize extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHumanReadableSize.Unit
-
Constructor Summary
Constructors Constructor Description HumanReadableSize()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longparse(String humanReadableSize)parse a size in bytes, KB, GB, MB
-
-
-
Method Detail
-
parse
public static long parse(String humanReadableSize)
parse a size in bytes, KB, GB, MB- Parameters:
humanReadableSize- : size with K/M/G like 1M, 12G- Returns:
- size in bytes
- Throws:
IllegalArgumentException- if size is not parsable
-
-