Package ch.qos.logback.core.util
Class FileSize
java.lang.Object
ch.qos.logback.core.util.FileSize
Instances of this class represent the size of a file. Internally, the size is
stored as long.>
The valueOf(java.lang.String)
method can convert strings such as "3 kb", "5 mb", into
FileSize instances. The recognized unit specifications for file size are the
"kb", "mb", and "gb". The unit name may be followed by an "s". Thus, "2 kbs"
and "2 kb" are equivalent. In the absence of a time unit specification, byte
is assumed.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LENGTH_PART
- See Also:
-
DOUBLE_GROUP
private static final int DOUBLE_GROUP- See Also:
-
UNIT_PART
- See Also:
-
UNIT_GROUP
private static final int UNIT_GROUP- See Also:
-
FILE_SIZE_PATTERN
-
KB_COEFFICIENT
public static final long KB_COEFFICIENT- See Also:
-
MB_COEFFICIENT
public static final long MB_COEFFICIENT- See Also:
-
GB_COEFFICIENT
public static final long GB_COEFFICIENT- See Also:
-
size
final long size
-
-
Constructor Details
-
FileSize
public FileSize(long size)
-
-
Method Details