public enum ByteSizeUnit extends java.lang.Enum<ByteSizeUnit>
Modifier and Type | Method and Description |
---|---|
abstract long |
toBytes(long size) |
abstract long |
toGB(long size) |
abstract long |
toKB(long size) |
abstract long |
toMB(long size) |
abstract long |
toPB(long size) |
abstract long |
toTB(long size) |
static ByteSizeUnit |
valueOf(java.lang.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 final ByteSizeUnit TB
public static final ByteSizeUnit PB
public static ByteSizeUnit[] values()
for (ByteSizeUnit c : ByteSizeUnit.values()) System.out.println(c);
public static ByteSizeUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract long toBytes(long size)
public abstract long toKB(long size)
public abstract long toMB(long size)
public abstract long toGB(long size)
public abstract long toTB(long size)
public abstract long toPB(long size)