The valueOf 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 |
|---|---|
| private static final int | |
| private static final Pattern | |
| public static final long | |
| public static final long | |
| private static final String | |
| public static final long | |
| pack-priv final long | |
| private static final int | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public String | |
| public static FileSize |
| DOUBLE_GROUP | back to summary |
|---|---|
| private static final int DOUBLE_GROUP | |
| FILE_SIZE_PATTERN | back to summary |
|---|---|
| private static final Pattern FILE_SIZE_PATTERN | |
| GB_COEFFICIENT | back to summary |
|---|---|
| public static final long GB_COEFFICIENT | |
| KB_COEFFICIENT | back to summary |
|---|---|
| public static final long KB_COEFFICIENT | |
| LENGTH_PART | back to summary |
|---|---|
| private static final String LENGTH_PART | |
| MB_COEFFICIENT | back to summary |
|---|---|
| public static final long MB_COEFFICIENT | |
| size | back to summary |
|---|---|
| pack-priv final long size | |
| UNIT_GROUP | back to summary |
|---|---|
| private static final int UNIT_GROUP | |
| UNIT_PART | back to summary |
|---|---|
| private static final String UNIT_PART | |
| FileSize | back to summary |
|---|---|
| public FileSize(long size) | |
| getSize | back to summary |
|---|---|
| public long getSize() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| valueOf | back to summary |
|---|---|
| public static FileSize valueOf(String fileSizeStr) | |