Logback: the reliable, generic, fast and flexible logging framework.
Copyright (C) 1999-2011, QOS.ch. All rights reserved.
This program and the accompanying materials are dual-licensed under
either the terms of the Eclipse Public License v1.0 as published by
the Eclipse Foundation
or (per the licensee's choosing)
under the terms of the GNU Lesser General Public License version 2.1
as published by the Free Software Foundation.
Instances of this class represent the size of a file. Internally, the size is
stored as long.>
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
long lenValue = Long.valueOf(lenStr);
return new FileSize(lenValue * coefficient);
+ "] is not in the expected format.");