Class FileSize
java.lang.Object
org.apache.logging.log4j.core.appender.rolling.FileSize
FileSize utility class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOGGER
-
KB
private static final long KB- See Also:
-
MB
private static final long MB- See Also:
-
GB
private static final long GB- See Also:
-
TB
private static final long TB- See Also:
-
VALUE_PATTERN
Pattern for string parsing.
-
-
Constructor Details
-
FileSize
private FileSize()
-
-
Method Details
-
parse
Converts a string to a number of bytes. Strings consist of a floating point value followed by K, M, or G for kilobytes, megabytes, gigabytes, respectively. The abbreviations KB, MB, and GB are also accepted. Matching is case insensitive.- Parameters:
string
- The string to convertdefaultValue
- The default value if a problem is detected parsing.- Returns:
- The Bytes value for the string
-