public enum ByteSizeUnit extends Enum<ByteSizeUnit>
| Modifier and Type | Method and Description |
|---|---|
long |
toBytes(long size) |
long |
toGB(long size) |
long |
toKB(long size) |
long |
toMB(long size) |
static ByteSizeUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ByteSizeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ByteSizeUnit BYTES
public static final ByteSizeUnit KB
public static final ByteSizeUnit MB
public static final ByteSizeUnit GB
public static ByteSizeUnit[] values()
for (ByteSizeUnit c : ByteSizeUnit.values()) System.out.println(c);
public static ByteSizeUnit valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic long toBytes(long size)
public long toKB(long size)
public long toMB(long size)
public long toGB(long size)
Copyright © 2020. All rights reserved.