public class FileSize
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
static long |
GB_COEFFICIENT |
static long |
KB_COEFFICIENT |
static long |
MB_COEFFICIENT |
Constructor and Description |
---|
FileSize(long size) |
Modifier and Type | Method and Description |
---|---|
long |
getSize() |
java.lang.String |
toString() |
static FileSize |
valueOf(java.lang.String fileSizeStr) |
public static final long KB_COEFFICIENT
public static final long MB_COEFFICIENT
public static final long GB_COEFFICIENT
public long getSize()
public static FileSize valueOf(java.lang.String fileSizeStr)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved