Package net.sf.ehcache.util
Class MemorySizeParser
- java.lang.Object
-
- net.sf.ehcache.util.MemorySizeParser
-
public class MemorySizeParser extends java.lang.ObjectMemory size parser using the letter k or K to indicate kilobytes, the letter m or M to indicate megabytes, the letter g or G to indicate gigabytes and the letter t or T to indicate terabytes.- Author:
- Ludovic Orban
-
-
Constructor Summary
Constructors Constructor Description MemorySizeParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longparse(java.lang.String configuredMemorySize)Parse a String containing a human-readable memory size.
-
-
-
Method Detail
-
parse
public static long parse(java.lang.String configuredMemorySize) throws java.lang.IllegalArgumentExceptionParse a String containing a human-readable memory size.- Parameters:
configuredMemorySize- the String containing a human-readable memory size.- Returns:
- the memory size in bytes.
- Throws:
java.lang.IllegalArgumentException- thrown when the configured memory size cannot be parsed.
-
-